Skip to content

Instantly share code, notes, and snippets.

@SeanSobey
Created March 23, 2018 08:25
Show Gist options
  • Save SeanSobey/91e744837e1e4e38573bc3d89488b808 to your computer and use it in GitHub Desktop.
Save SeanSobey/91e744837e1e4e38573bc3d89488b808 to your computer and use it in GitHub Desktop.
Git rename command as alias
[alias]
rename = "!moveit() { branchname=$(git rev-parse --abbrev-ref HEAD); git branch -m $branchname $1; git push origin :$branchname; git push --set-upstream origin $1; }; moveit"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment