You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Track upstream: keeping your copy up-to-date with the main one
54
48
55
49
This instructions follow the recommendations on [syncing a fork from GitHub](ttps://help.github.com/articles/syncing-a-fork/). To make sure that your version remains up to date with
56
50
the master version, set the upstream tracking on the command line:
Now, every time you need to apply the changes that have been made to the master version to yours, navigate to your a repository directory and run on the command line:
63
55
64
-
`
56
+
```
65
57
git fetch upstream
66
58
git merge upstream/master
67
-
`
59
+
```
68
60
69
61
## Working on a new (big) feature
70
62
71
63
### Branch, contribute and Commit
72
64
73
65
To start working on new feature, create a separate feature branch:
74
66
75
-
`git checkout -b feature`
67
+
`git checkout -b feature`
76
68
77
69
You can check the branches you have by:
78
70
79
-
`git branch`
71
+
`git branch`
80
72
81
73
And switch between them with:
82
-
`
83
-
git checkout master
84
-
git checkout feature
85
-
`
74
+
75
+
```
76
+
git checkout master
77
+
git checkout feature
78
+
```
79
+
86
80
Once some changes have been made in the branch, stage them
87
81
and commit:
88
-
`
89
-
git add .
90
-
git commit -m "Add a comment here"
91
-
`
82
+
83
+
```
84
+
git add .
85
+
git commit -m "Add a comment here"
86
+
```
87
+
92
88
### (Merge and) Push
93
89
94
90
You can push changes with:
95
91
96
-
`git push origin feature`
92
+
`git push origin feature`
97
93
98
94
Alternatively, you can merge the changes with the master
0 commit comments