NAME
git-check-merge-conflicts - Find merge conflicts between branches in a git repository.
SYNOPSIS
git-check-merge-conflicts [options] <branch1> [<branch2> ...]
DESCRIPTION
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 git-diff
command.
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.
OPTIONS
-help, -h
Output the current version number and this usage documentation.
-quiet, -q
Will just tell you if there were conflicts or not.
-verbose, -v
By default 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 --word-diff=plain
.
-branch-as-prefix
git-diff
uses a
and 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:
a/path/file b/path/file
You'll get
branch1:path/file branch2:path/file
For all other options see the git-diff
documentation (in particular for --word-diff
).
INTERFACE
current_branch
Return the current branch. This just calls git branch
and finds the one with a *
next to it.
find_conflicts
Assuming we have found a merge conflict, find all files with merge conflicts. This uses the git ls-files -u
command internally.
process_conflicts
For all known files with conflicts on a given branch, run git diff
(with various options) and display the output.
process_command_options
Process options entered on the command-line for specific git commands they'll eventually be handed off to.
local_branches
Returns a list of the local branches (including the current one).
non_relevant_files
Returns list of files that would normally be removed by git-clean
.
working_dir_clean
Check to see that there are no uncommitted changes in the working directory.
DEPENDENCIES
- git
-
This uses the Git.pm module in the Git project.
SEE ALSO
git diff
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 427:
You forgot a '=back' before '=head1'