From af1e3184b5fe58a95469d279add3793b03b140db Mon Sep 17 00:00:00 2001 From: Jordan Atwood Date: Thu, 26 May 2022 12:29:28 -0700 Subject: [PATCH] Improve git co-pr alias readability --- src/.gitconfig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/.gitconfig b/src/.gitconfig index 983a216..2c0f46c 100644 --- a/src/.gitconfig +++ b/src/.gitconfig @@ -4,7 +4,10 @@ amend-a = commit -a --amend # 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" - 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-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