Skip to content

Instantly share code, notes, and snippets.

@cacheflow
Created November 29, 2021 18:44
Show Gist options
  • Save cacheflow/20c0374a121e5d41cce768ea4f707759 to your computer and use it in GitHub Desktop.
Save cacheflow/20c0374a121e5d41cce768ea4f707759 to your computer and use it in GitHub Desktop.
rename-branch() {
current_branch_name="$(git branch --show-current)"
renamed_branch="$1"
eval '$(git branch -m ${current_branch_name} ${renamed_branch})'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment