blog:2022:0109_working_on_a_repository_with_3-branches
Working on a repository with 3-branches
I have a repository with 3 branches:
- master - main project
- upstream - upstream project
- work - working copy of project with current semester data
In order to update (merge) upstream into master, I need to
# git checkout upstream # git pull /path/to/upstream/repo # git checkout master # git merge upstream # git checkout work # git merge master
I would prefer to do this without doing those multiple checkouts. SO, I found a way to do just that…
# git fetch /path/to/upstream/repo master:upstream # git fetch . upstream:master # git merge master
However, this only work IF updating master involves purely fast-forward merge.
That is all I have to say about that.
blog/2022/0109_working_on_a_repository_with_3-branches.txt · Last modified: 2022/02/10 10:05 by 127.0.0.1