Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- git()
- {
- if [[ $1 == "merge" ]] || [[ $1 == "rebase" ]] || [[ $1 == "pull" ]]; then
- command git "$@"
- rc=$?
- if [[ $rc == 1 ]]; then
- echo "There are conflicts, better run git-mergetool!!!"
- # There might be some other condition that returns a '1',
- # if so you can add another check like this:
- # if grep Conflicts $(git --git-dir)/MERGE_MSG;
- FILE="MERGETOOL"
- if [ -f $FILE ]; then
- command git mergetool
- fi
- fi
- else
- command git "$@"
- fi
- }
- ub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement