Skip to content

Instantly share code, notes, and snippets.

@genadyp
Created June 30, 2024 07:48
Show Gist options
  • Save genadyp/f59161121810901d1e43b0871cfc0f5c to your computer and use it in GitHub Desktop.
Save genadyp/f59161121810901d1e43b0871cfc0f5c to your computer and use it in GitHub Desktop.
git useful links and tips

How-to migrate git branch to another name

# resource_db_dev -> staging
# resource_db_prod -> main
# Please run following commands in your local env to update copies.

git branch -m resource_db_dev staging
git branch -m resource_db_prod main
git fetch origin
git branch -u origin/main main
git branch -u origin/staging staging
git remote set-head origin -a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment