Git Merging Branches (with Conflicts)
Master Branch — master
Feature C— feature-c (branch which will have the conflict with master)
List down the available branches
git branch -a
Checkout the master branch
git checkout master
Merge the feature-c for the master
git merge feature-c
<MERGE CONFLICT ERRORS SHOULD LIST IN THE TERMINAL>
Go to the each of files and resolve each conflict manually.
After manually fixing all the conflicts, add the changes to git.
git add .
git commit (← without any commit comment as merging automatically adds)
Linux/Unix terminal will open-up. Just press “SHIFT + :” and enter “wq”.
Unix terminal will exit and merging message will display in git-terminal
Check for the git log for the commit;
git log — oneline
After the merge, if you wanna create a new branch from the master;
git checkout -b feature-c-new