Improve git co-pr alias readability

master
Jordan Atwood 2 years ago
parent 31626dc73e
commit af1e3184b5
Signed by: nightfirecat
GPG Key ID: 615A619C2D73A6DF
  1. 5
      src/.gitconfig

@ -4,7 +4,10 @@
amend-a = commit -a --amend amend-a = commit -a --amend
# TODO: fix below; that method is not accurate # TODO: fix below; that method is not accurate
# check-merge = "!f() { output=$(git format-patch ${1:-master} --stdout | git apply --3way --check - 2>/dev/null); exit_code=$?; if [ $exit_code != '0' ] && [ $exit_code != '128' ]; then echo 'Merge conflicts exist! See `git apply` output below:'; echo; echo $output; fi; }; f" # check-merge = "!f() { output=$(git format-patch ${1:-master} --stdout | git apply --3way --check - 2>/dev/null); exit_code=$?; if [ $exit_code != '0' ] && [ $exit_code != '128' ]; then echo 'Merge conflicts exist! See `git apply` output below:'; echo; echo $output; fi; }; f"
co-pr = "!f() { [ $# -ne 2 ] && echo 'Two arguments required, PR # and branch name' && exit 1; git fetch upstream pull/$1/head:$2-$1 && git checkout $2-$1 && git merge master --no-gpg-sign --no-edit; }; f" co-pr = "!f() { \
[ $# -ne 2 ] && echo 'Two arguments required, PR # and branch name' && exit 1; \
git fetch upstream pull/$1/head:$2-$1 && git checkout $2-$1 && git merge master --no-gpg-sign --no-edit; \
}; f"
fixup = commit --amend --no-edit fixup = commit --amend --no-edit
fixup-a = commit -a --amend --no-edit fixup-a = commit -a --amend --no-edit
ll = log --pretty=format:"%C(yellow)%h%C(red)%d%C(reset)\\ %s\\ %C(blue)%C(bold)[%aN]%C(reset)" --decorate --numstat ll = log --pretty=format:"%C(yellow)%h%C(red)%d%C(reset)\\ %s\\ %C(blue)%C(bold)[%aN]%C(reset)" --decorate --numstat

Loading…
Cancel
Save