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
-verbose, -v
By default, git-check-merge-conflicts
only tells you which branches had conflicts. The -verbose|-v
option gives you slightly more verbose output that tells you which files had conflicts.
You can add a second -verbose
or -v
to get the git-diff
output.
-branch-as-prefix
This makes diff output use the branch name as the prefix in its output. By default git-diff
uses a
and b
. So instead of
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 409:
You forgot a '=back' before '=head1'