git-check-merge-conflicts - Find merge conflicts between branches in a git repository.
git-check-merge-conflicts [options] <branch1> [<branch2> ...]
This script finds potential merge conflicts between branches so that you don't have to find out when doing the actual merge. Conflicts are displayed using the output of the
Internally this runs
git-merge --no-commit branch followed by a
git-merge --abort for each of the branches given on the command line. If there are merge conflicts between any two branches, the respective
git-diff outut can be used to see the actual conflicts.
Output the current version number and this usage documentation.
Will just tell you if there were conflicts or not.
git-check-merge-conflicts only tells you which branches had conflicts and the names of the files in which they occur. The
-verbose|-v option gives you the
git-diff output. This is equivalent to using the parameter
b to designate the respective branches in its output by default. This option tells
git-diff to instead use the branch name as the prefix. So rather than:
For all other options see the
git-diff documentation (in particular for
Return the current branch. This just calls
git branch and finds the one with a
* next to it.
Assuming we have found a merge conflict, find all files with merge conflicts. This uses the
git ls-files -u command internally.
For all known files with conflicts on a given branch, run
git diff (with various options) and display the output.
Process options entered on the command-line for specific git commands they'll eventually be handed off to.
Returns a list of the local branches (including the current one).
Returns list of files that would normally be removed by
Check to see that there are no uncommitted changes in the working directory.
This uses the Git.pm module in the Git project.