Skip to content

Instantly share code, notes, and snippets.

@Le0X8
Last active July 11, 2024 17:01
Show Gist options
  • Save Le0X8/7c22533fe1d1104b84897d19aff611a6 to your computer and use it in GitHub Desktop.
Save Le0X8/7c22533fe1d1104b84897d19aff611a6 to your computer and use it in GitHub Desktop.
My .zshrc
commit() { # commit <message>
git stage -A
git commit -m "$*"
git push
}
archive-branch() { # archive-branch <name>
git tag archive/$* $*
git push origin archive/$*
git branch -D $*
git push origin --delete $*
}
restore-branch() { # restore-branch <name>
git checkout -b $* archive/$*
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment