Created
June 13, 2018 12:35
-
-
Save smartdeal/34904968c3fccf6255b76efa5ed1f6e8 to your computer and use it in GitHub Desktop.
[Перенести коммит в новую ветку из мастера] #GIT
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Вот дерьмо, 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