Skip to content
This repository was archived by the owner on Jun 26, 2022. It is now read-only.

Commit 6809107

Browse files
Merge pull request #202 from gauravkhatri2698/my-branch
Updated Readme.md
2 parents 6f967b6 + 7494845 commit 6809107

File tree

2 files changed

+26
-22
lines changed

2 files changed

+26
-22
lines changed

CONTRIBUTORS.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
If you have contributed to this repository, kindly add your username here
44

5-
65
- [SanjayDevtech](https://github.com/SanjayDevTech)
76
- [hritikkhurana10sm](https://github.com/hritikkhurana10sm)
87
- [finalight](https://github.com/finalight)
@@ -23,3 +22,4 @@ If you have contributed to this repository, kindly add your username here
2322
- [HarshitGupta150](https://github.com/HarshitGupta150)
2423
- [qwertymaden](https://github.com/qwertymaden)
2524
- [mjnorton](https://github.com/mjnorton)
25+
- [gauravkhatri2698](https://github.com/gauravkhatri2698)

README.md

+25-21
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,26 @@
11
# Code-with-love
2-
Open source programming algorithms
32

3+
Open source programming algorithms
44

55
## Instructions:
66

7-
*Make sure you have a GitHub account. In case you don't have one, you can create your account by visiting https://github.com/ and clicking on ``Sign up`` option at the top right corner.*
8-
7+
_Make sure you have a GitHub account. In case you don't have one, you can create your account by visiting https://github.com/ and clicking on `Sign up` option at the top right corner._
98

109
### 1. Star and Fork this Repository
10+
1111
###### You can star and fork this repository on GitHub by navigating at the top of this repository.
1212

1313
GitHub repository URLs will reference both the username associated with the owner of the repository, as well as the repository name. For example, acmbvp is the owner of the Hacktoberfest repository, so the GitHub URL for this project is:
1414

1515
https://github.com/SanjayDevTech/Code-with-love
1616

17-
1817
When you’re on the main page of a repository, you’ll see a button to "Star" and “Fork” the repository on the upper right-hand side of the page, underneath your user icon.
1918

2019
### 2. Clone the Repository
2120

2221
To make your own local copy of the repository you would like to contribute to, let’s first open up a terminal window.
2322

24-
We’ll use the `git clone` command along with the URL that points to your fork of the repository.
23+
We’ll use the `git clone` command along with the URL that points to your fork of the repository.
2524

2625
This URL will be similar to the URL above, except now it will end with `.git.` The URL will look like this:
2726
https://github.com/your-username/Code-with-love.git
@@ -32,60 +31,65 @@ Once we have the URL, we’re ready to clone the repository. To do this, we’ll
3231

3332
`git clone https://github.com/your-username/Code-with-love.git`
3433

35-
3634
### 3. Create a New Branch
3735

3836
To create your branch, from your terminal window, change your directory so that you are working in the directory of the repository. Be sure to use the actual name of the repository (i.e. Code-with-love) to switch into that directory.
3937

40-
##### `cd Code-with-love`
38+
##### `cd Code-with-love`
4139

4240
Now, we’ll create our new branch with the git branch command. Make sure you name it descriptively so that others working on the project understand what you are working on.
4341

4442
##### `git branch new-branch`
4543

4644
Now that our new branch is created, we can switch to make sure that we are working on that branch by using the git checkout command:
4745

48-
##### ` git checkout new-branch `
46+
##### `git checkout new-branch`
4947

5048
Once you enter the git `checkout` command, you will receive the following output:
5149

52-
###### `Output:`
53-
##### `Switched to branch 'new-branch' `
50+
###### `Output:`
5451

52+
##### `Switched to branch 'new-branch' `
53+
54+
##### `code .`
55+
56+
Once you enter this command, the whole code will automatically open in your code editor
5557

5658
At this point, you can now modify existing files or add new files to the project on your own branch.
5759

5860
#### Make Changes Locally
5961

6062
Once you have modified existing files or added new files to the project, you can add them to your local repository, which you can do with the git add command. Let’s add the -A flag to add all changes that we have made:
6163

62-
##### ` git add -A ` or ` git add . `
64+
##### `git add -A` or `git add .`
6365

6466
Next, we’ll want to record the changes that we made to the repository with the git commit command.
6567

66-
*The commit message is an important aspect of your code contribution; it helps the other contributors fully understand the change you have made, why you made it, and how significant it is. Additionally, commit messages provide a historical record of the changes for the project at large, helping future contributors along the way.*
67-
68+
_The commit message is an important aspect of your code contribution; it helps the other contributors fully understand the change you have made, why you made it, and how significant it is. Additionally, commit messages provide a historical record of the changes for the project at large, helping future contributors along the way._
6869

6970
If you have a very short message, you can record that with the -m flag and the message in quotes:
7071

71-
###### ` Example: `
72-
##### ` git commit -m "Updated Readme.md" `
72+
###### `Example:`
73+
74+
##### `git commit -m "Updated Readme.md"`
7375

7476
###### At this point you can use the git push command to push the changes to the current branch of your forked repository:
77+
7578
###### ` Example:`
76-
##### ` git push --set-upstream origin new-branch `
79+
80+
##### `git push --set-upstream origin new-branch`
7781

7882
### 4. Update Local Repository
7983

80-
*While working on a project alongside other contributors, it is important for you to keep your local repository up-to-date with the project as you don’t want to make a pull request for code that will cause conflicts. To keep your local copy of the code base updated, you’ll need to sync changes.*
84+
_While working on a project alongside other contributors, it is important for you to keep your local repository up-to-date with the project as you don’t want to make a pull request for code that will cause conflicts. To keep your local copy of the code base updated, you’ll need to sync changes._
8185

8286
We’ll first go over configuring a remote for the fork, then syncing the fork.
8387

8488
### 5. Configure a Remote for the Fork
8589

8690
Next up, you’ll have to specify a new remote upstream repository for us to sync with the fork. This will be the original repository that you forked from. you’ll have to do this with the git remote add command.
8791

88-
##### ` git remote add upstream https://github.com/your-username/Code-with-love.git `
92+
##### `git remote add upstream https://github.com/your-username/Code-with-love.git`
8993

9094
In this example, // upstream // is the shortname we have supplied for the remote repository since in terms of Git, “upstream” refers to the repository that you cloned from. If you want to add a remote pointer to the repository of a collaborator, you may want to provide that collaborator’s username or a shortened nickname for the shortname.
9195

@@ -94,15 +98,15 @@ In this example, // upstream // is the shortname we have supplied for the remote
9498
Once you have configured a remote that references the upstream and original repository on GitHub, you are ready to sync your fork of the repository to keep it up-to-date.
9599
To sync your fork, from the directory of your local repository in a terminal window, you’ll have to use the // git fetch // command to fetch the branches along with their respective commits from the upstream repository. Since you used the shortname “upstream” to refer to the upstream repository, you’ll have to pass that to the command:
96100

97-
##### ` git fetch upstream `
101+
##### `git fetch upstream`
98102

99103
Switch to the local master branch of our repository:
100104

101-
##### ` git checkout master `
105+
##### `git checkout master`
102106

103107
Now merge any changes that were made in the original repository’s master branch, that you will access through your local upstream/master branch, with your local master branch:
104108

105-
##### ` git merge upstream/master `
109+
##### `git merge upstream/master`
106110

107111
### 7. Create Pull Request
108112

0 commit comments

Comments
 (0)