@@ -61,8 +61,10 @@ ORIGIN\_URL.
6161
6262Clone your repository, leaving a local folder for you to work with:
6363
64- cd ALL_PROJECTS
65- git clone ORIGIN_URL
64+ ``` console
65+ > cd ALL_PROJECTS
66+ > git clone ORIGIN_URL
67+ ```
6668
6769## Syncing your repository
6870
@@ -72,16 +74,20 @@ an alias for the shared repository as well, so that you can "synch" the
7274two, making sure that your repository includes any other contributions
7375that have been merged by us into the shared repo:
7476
75- git remote add upstream UPSTREAM_URL
77+ ``` console
78+ > git remote add upstream UPSTREAM_URL
79+ ```
7680
7781Then synchronizing is done by pulling from us and pushing to you. This
7882is normally done locally, so that you can resolve any merge conflicts.
7983For instance, to synchronize ** develop** branches:
8084
81- git switch develop
82- git fetch upstream
83- git merge upstream/develop
84- git push origin develop
85+ ``` console
86+ > git switch develop
87+ > git fetch upstream
88+ > git merge upstream/develop
89+ > git push origin develop
90+ ```
8591
8692You might get merge conflicts when you merge. It is your
8793responsibility to resolve those locally, so that you can continue
@@ -112,14 +118,18 @@ For instance, if you send a PR to __"develop"__ branch, make sure you are in the
112118new bugfix branch, based on * develop* , for a new feature you are
113119creating:
114120
115- git switch develop
116- git switch -c fix/problem123
121+ ``` console
122+ > git switch develop
123+ > git switch -c fix/problem123
124+ ```
117125
118126If you send a PR with an enhancement, make sure you are in the * next minor version* branch,
119127and create a new feature branch, based on, e.g., * 4.3* , for a new feature you are creating:
120128
121- git switch 4.3
122- git switch -c new/mind-reader
129+ ``` console
130+ > git switch 4.3
131+ > git switch -c new/mind-reader
132+ ```
123133
124134Saving changes only updates your local working area.
125135
@@ -132,23 +142,27 @@ in.
132142You can have as many commits in a branch as you need to "get it right".
133143For instance, to commit your work from a debugging session:
134144
135- git add .
136- git commit -S -m "Find and fix the broken reference problem"
145+ ``` console
146+ > git add .
147+ > git commit -S -m " Find and fix the broken reference problem"
148+ ```
137149
138150Just make sure that your commits in a feature branch are all related.
139151
140152If you are working on two features at a time, then you will want to
141153switch between them to keep the contributions separate. For instance:
142154
143- git switch new/mind-reader
144- // work away
145- git add .
146- git commit -S -m "Added adapter for abc"
147- git switch fix/issue-123
148- // work away
149- git add .
150- git commit -S -m "Fixed problem in DEF\Something"
151- git switch develop
155+ ``` console
156+ > git switch new/mind-reader
157+ > # # work away
158+ > git add .
159+ > git commit -S -m " Added adapter for abc"
160+ > git switch fix/issue-123
161+ > # # work away
162+ > git add .
163+ > git commit -S -m " Fixed problem in DEF\Something"
164+ > git switch develop
165+ ```
152166
153167The last checkout makes sure that you end up in your * develop* branch as
154168a starting point for your next session working with your repository.
@@ -166,19 +180,25 @@ It is a lot easier to resolve conflicts at this stage.
166180
167181Synchronize your repository:
168182
169- git switch develop
170- git fetch upstream
171- git merge upstream/develop
172- git push origin develop
183+ ``` console
184+ > git switch develop
185+ > git fetch upstream
186+ > git merge upstream/develop
187+ > git push origin develop
188+ ```
173189
174190Bring your feature branch up to date:
175191
176- git switch new/mind-reader
177- git rebase upstream/develop
192+ ``` console
193+ > git switch new/mind-reader
194+ > git rebase upstream/develop
195+ ```
178196
179197And finally push your local branch to your GitHub repository:
180198
181- git push --force-with-lease origin new/mind-reader
199+ ``` console
200+ > git push --force-with-lease origin new/mind-reader
201+ ```
182202
183203## Pull Requests
184204
@@ -232,23 +252,29 @@ do the following:
232252
233253Synchronize your repository:
234254
235- git switch develop
236- git fetch upstream
237- git merge upstream/develop
238- git push origin develop
255+ ``` console
256+ > git switch develop
257+ > git fetch upstream
258+ > git merge upstream/develop
259+ > git push origin develop
260+ ```
239261
240262Bring your feature branch up to date:
241263
242- git switch new/mind-reader
243- git rebase upstream/develop
264+ ``` console
265+ > git switch new/mind-reader
266+ > git rebase upstream/develop
267+ ```
244268
245269You might get conflicts when you rebase. It is your
246270responsibility to resolve those locally, so that you can continue
247271collaborating with the shared repository.
248272
249273And finally push your local branch to your GitHub repository:
250274
251- git push --force-with-lease origin new/mind-reader
275+ ``` console
276+ > git push --force-with-lease origin new/mind-reader
277+ ```
252278
253279## Cleanup
254280
0 commit comments