Skip to content

Commit 2df95af

Browse files
authored
Use git merge in defined user workflow (#23)
Problem: Use of git pull --rebase was not correct Solution: Use 'git merge upstream/main' to synchronize upstream Signed-off-by: eccles phewlett76@gmail.com
1 parent 033e003 commit 2df95af

1 file changed

Lines changed: 3 additions & 13 deletions

File tree

README.md

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -255,20 +255,10 @@ Bring in latest changes from upstream:
255255
```bash
256256
git fetch upstream
257257
git checkout main
258-
git pull --rebase upstream main
258+
git merge upstream/main
259259
git checkout dev/githubUserHandle/some-proposed-fix
260260
git rebase -i --autosquash main
261261
```
262-
> Caveat
263-
>
264-
> Note that we are rebasing to pull in upstream changes. This assumes that
265-
> the branch is only accessed/written by one person. If the branch is
266-
> collaborative the better option is to 'git merge main' as this is
267-
> safer but pollutes the git history with merge commits.
268-
> See https://www.atlassian.com/git/tutorials/merging-vs-rebasing#the-golden-rule-of-rebasing
269-
>
270-
> This caveat applies to all occurrences of 'git rebase' in this document.
271-
272262

273263
Ensure that your email and name are correct:
274264

@@ -318,7 +308,7 @@ squash all your fixups after syncing upstream:
318308
```bash
319309
git fetch upstream
320310
git checkout main
321-
git pull --rebase upstream main
311+
git merge upstream/main
322312
git checkout dev/githubUserHandle/some-proposed-fix
323313
git rebase -i --autosquash main
324314
git push -f
@@ -333,7 +323,7 @@ At this point one must tidy up the local fork:
333323
```bash
334324
git fetch upstream
335325
git checkout main
336-
git pull
326+
git merge upstream/main
337327
git log
338328
git branch -d dev/githubUserHandle/some-proposed-fix
339329
```

0 commit comments

Comments
 (0)