Вернитесь файл фиксации

В моем репозитории я получил 2 ответвления при использовании мерзавца-svn

$ git branch -a
* master
  remotes/git-svn

Теперь я вижу разность с

$ git diff --name-status remotes/git-svn
M       global/library/Exception.php

Как я могу вернуться модификация?Спасибо

1
задан mathk 28 June 2010 в 10:05
поделиться

1 ответ

Попробуйте следующее:

# create new branch (just in case you have some modifications in master branch)
git checkout -b revert_wrong_commit
# svn switch
git reset --hard git-svn
# undo last commit (takes the patch from the commit and unapplies it)
git revert HEAD
# commit the reverted changes
git commit -a
# switch to master branch
git checkout master
# merge the changes from revert_wrong_commit branch
git merge revert_wrong_commit
2
ответ дан 2 September 2019 в 23:26
поделиться
Другие вопросы по тегам:

Похожие вопросы: