diff options
author | Toby Vincent <tobyv13@gmail.com> | 2021-05-15 15:48:48 -0500 |
---|---|---|
committer | Toby Vincent <tobyv13@gmail.com> | 2021-05-15 15:48:48 -0500 |
commit | ca35d123bea507d9c458c559ccdcfe2a9b9786d8 (patch) | |
tree | 773a4c5cad0f2ef203dff0d35af4527d09ebce07 | |
parent | d34462b9469965f62db2fbff01f8f8c96938b394 (diff) |
feat: added git alias for branch rename
-rw-r--r-- | gitconfig | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -47,6 +47,9 @@ ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [a:%an,c:%cn]" # undo http://megakemp.com/2016/08/25/git-undo/ undo = "!f() { git reset --soft $(git rev-parse --abbrev-ref HEAD)@{${1-1}}; }; f" +# rename branch +brn = "!f() { git branch -m \"$(git rev-parse --abbrev-ref HEAD)\" $1; git fetch origin; git branch -u origin/$1 $1; git remote set-head origin -a; }; f" + # grep on filename f = "!git ls-files | grep -i" |