Avoid repeated merge conflicts
Fixing Merge conflicts repeatedly is really bothersome.
Suppose your team is working on various feature branches at the same time. Now you want to merge all of them together. There are several merge conflicts, which you resolve. But it turns out that one of the branches isn’t quite there yet, so you decide to un-merge it again. After few days when the branch is finally ready,you merge it again, but thanks to the recorded resolutions, you won’t have to resolve the same merge conflicts again.
// Add it to your global config to enable it for all projects
git config --global rerere.enabled true
Common Git Problems and Their Fixes
Git is a free and open-source version control system. These days git is being extensively used and therefore this article focuses on some of the common Git tricks that everybody at some point of time requires while working with git or Github.
Sometimes the user makes some mistakes while working on Git which results in the loss of information or wrong information being added. To overcome this problem, Git provides some methods/tricks to roll back or modify the changes that were made wrong or made by mistake. Some of these problems along with their fixes are listed below:
Table of Content
- 1. Edit a commit message
- 2. Undo the local commits
- 3. Reverting pushed commits
- 4. Avoid repeated merge conflicts
- 5. Find a commit that broke something after a merge