Add git aliases

This commit is contained in:
Martin Blazik
2024-03-15 10:46:21 +01:00
parent ca1a1e54ac
commit d2542f38eb

View File

@@ -109,6 +109,7 @@ function unset_colors() {
git_set core.editor vim
git_set submodule.recurse true
git_set push.autoSetupRemote true
git_set pull.ff only
git_alias st status
@@ -123,6 +124,7 @@ git_alias copy 'branch --copy'
git_alias co checkout
git_alias cob "checkout -b"
git_alias sw switch
git_alias swm "switch master"
git_alias mr $'!sh -c \'git fetch $1 merge-requests/$2/head:mr-$1-$2 && git checkout mr-$1-$2\' -'
git_alias pr $'!sh -c \'git fetch $1 pull/$2/head:pr-$1-$2 && git checkout pr-$1-$2\' -'