Skip to content

Commit

Permalink
Use git merge in defined user workflow (#23)
Browse files Browse the repository at this point in the history
Problem:
Use of git pull --rebase was not correct

Solution:
Use 'git merge upstream/main' to synchronize upstream

Signed-off-by: eccles [email protected]
  • Loading branch information
eccles authored Jun 1, 2021
1 parent 033e003 commit 2df95af
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,20 +255,10 @@ Bring in latest changes from upstream:
```bash
git fetch upstream
git checkout main
git pull --rebase upstream main
git merge upstream/main
git checkout dev/githubUserHandle/some-proposed-fix
git rebase -i --autosquash main
```
> Caveat
>
> Note that we are rebasing to pull in upstream changes. This assumes that
> the branch is only accessed/written by one person. If the branch is
> collaborative the better option is to 'git merge main' as this is
> safer but pollutes the git history with merge commits.
> See https://www.atlassian.com/git/tutorials/merging-vs-rebasing#the-golden-rule-of-rebasing
>
> This caveat applies to all occurrences of 'git rebase' in this document.

Ensure that your email and name are correct:

Expand Down Expand Up @@ -318,7 +308,7 @@ squash all your fixups after syncing upstream:
```bash
git fetch upstream
git checkout main
git pull --rebase upstream main
git merge upstream/main
git checkout dev/githubUserHandle/some-proposed-fix
git rebase -i --autosquash main
git push -f
Expand All @@ -333,7 +323,7 @@ At this point one must tidy up the local fork:
```bash
git fetch upstream
git checkout main
git pull
git merge upstream/main
git log
git branch -d dev/githubUserHandle/some-proposed-fix
```
Expand Down

0 comments on commit 2df95af

Please sign in to comment.