git merge sanity check
Developer A is working on branch 2012A
I branch 2012A, and create branch 2012B
- Getting into rebase -> merge cycle with Git
- Pull request plugin to merge master into branch
- Git merge two repositories
- how can I customize git's merge commit message?
- Can I work on a branch with patches merged from another branches?
- GitLab - ignore specific files in target branch
I want all the new changes from 2012A, so I simply want to merge them into 2012B and carry on working.
Does this look ok as a workflow?
git checkout 2012A (switch to 2012A) git pull origin 2012A (update 2012A) git checkout 2012B (switch to 2012B) git merge 2012A (merge in 2012A) git commit -m 'commiting changes from 2012A' (commit changes from 2012A in 2012B)
Thanks in advance,
One Solution collect form web for “git merge sanity check”
It should work, however you could do it in a simpler way:
directly from branch
git fetch origin git merge origin/2012A
Note that you are not required to have a local branch for
2012A: if have a repository in your remotes (here your remote is
origin) you usually carry the snapshots of the remote branches. You can see them by running:
git branch -a
remotes/... entries of the output)
git fetch command updates the snapshots, so
git fetch origin updates your local images of the remote branches in
git merge origin/2012A merges such image into the current branch (i.e. applies the patches of