Skip to content

Instantly share code, notes, and snippets.

@HelgaZhizhka
Forked from beardlessman/GIT-rename-branch
Created March 24, 2020 09:34
Show Gist options
  • Save HelgaZhizhka/170924e96a864d61d4fffdc29339b8ab to your computer and use it in GitHub Desktop.
Save HelgaZhizhka/170924e96a864d61d4fffdc29339b8ab to your computer and use it in GitHub Desktop.
[Git] Переименование ветки (локально и удаленно)
git branch -m old_branch new_branch – переименовать локальную ветку
git push origin :old_branch – удалить старую ветку
git push --set-upstream origin new_branch – выгрузить новую ветку и "закрепить" ее за локальной веткой
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment