1
在我的倉庫我使用Git svn的將其還原爲提交文件
$ git branch -a
* master
remotes/git-svn
現在我可以看到
$ git diff --name-status remotes/git-svn
M global/library/Exception.php
的差異如何能恢復的修改時,有2支? 感謝
在我的倉庫我使用Git svn的將其還原爲提交文件
$ git branch -a
* master
remotes/git-svn
現在我可以看到
$ git diff --name-status remotes/git-svn
M global/library/Exception.php
的差異如何能恢復的修改時,有2支? 感謝
試試這個:
# 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