Skip to content

Instantly share code, notes, and snippets.

@smartdeal
Created June 13, 2018 12:35
Show Gist options
  • Save smartdeal/34904968c3fccf6255b76efa5ed1f6e8 to your computer and use it in GitHub Desktop.
Save smartdeal/34904968c3fccf6255b76efa5ed1f6e8 to your computer and use it in GitHub Desktop.
[Перенести коммит в новую ветку из мастера] #GIT
# Вот дерьмо, git, я случайно закоммитил правки в мастер ветку вместо новой!
# Создаём новую ветку
git branch some-new-branch-name
# Удаляем коммит из мастер-ветки
git reset HEAD~ --hard
# Теперь ваш коммит живет в новой ветке
git checkout some-new-branch-name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment