Monday, February 11, 2019

Git workflow to merge 2 branches



1. Switch to the branch you want to merge another branch

git checkout branch1

2. Execute merge command, here we are going to mcommandnch2 into branch1

git merge branch1

3. If conflict occures, manually resolve the conflict and add/stage the resolved files by executing

git add <file1 file2 ...>

4. Commit the merges.

git commit -m "message"

5. Push the changes.

git push origin branch1

No comments:

Post a Comment