Skip to content

Commit 666619b

Browse files
authored
Create README.md
1 parent 78e0ae9 commit 666619b

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

README.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# How to Collaborate:
2+
3+
1. Fork the repository to your own GitHub account.
4+
5+
2. Clone the repository to your local machine
6+
```
7+
$ git clone "https://www.github.com/{Username}/Design-and-Analysis-of-Algorithms.git"
8+
```
9+
where username is your GitHub account username.
10+
11+
3. Create a branch where you can do your local work.
12+
Never work on **master** branch as we do not allow master commits except by admins.
13+
```
14+
$ git branch {branchname}
15+
$ git checkout branchname
16+
```
17+
18+
4. Do your work and stage your changes.
19+
```
20+
$ git add <filename>
21+
```
22+
23+
5. Commit you changes with a commit message containing your name, file(s) worked upon, changes added.
24+
```
25+
$ git commit -m "Name| files| Changes"
26+
```
27+
28+
6. Push changes to your forked repository
29+
```
30+
$ git push -u origin branchname
31+
```
32+
33+
# Synchronize forked repository with Upstream repository
34+
35+
1. Create upstream as our repository
36+
```
37+
$ git remote add upstream "https://www.github.com/NishkarshRaj/Design-and-Analysis-of-Algorithms.git"
38+
```
39+
40+
2. Fetch upstream changes in local machine
41+
```
42+
$ git fetch upstream
43+
```
44+
45+
3. Switch to master branch
46+
```
47+
$ git checkout master
48+
```
49+
50+
4. Merge changes in local machine
51+
```
52+
$ git merge upstream/master
53+
```
54+
55+
5. Push changes to your forked GitHub repository
56+
```
57+
$ git push -f origin master
58+
```
59+

0 commit comments

Comments
 (0)