1
真的,我是即将使用git的新手,但我希望我没有放松太多的工作。我已经尝试切换到主分支,但正如你可以看到没有成功。转换分支的惊喜
[email protected] /d/workspace/android/tutorialA2 (about_screen)
$ git st
# On branch about_screen
nothing to commit (working directory clean)
[email protected] /d/workspace/android/tutorialA2 (about_screen)
$ git br
master
* about_screen
[email protected] /d/workspace/android/tutorialA2 (about_screen)
$ git co master
Unlink of file 'res/layout/view_about.xml' failed. Should I try again? (y/n) y
Unlink of file 'res/layout/view_about.xml' failed. Should I try again? (y/n) err
or: unable to unlink old 'res/layout/view_about.xml' (Permission denied)
现在,当我想提出一个结账到最后稳定的承诺,我得到这个消息:
$ git co 8759ba
fatal: Unable to create 'd:/workspace/android/tutorialA2/.git/index.lock': File exists.
If no other git process is currently running, this probably means a
git process crashed in this repository earlier. Make sure no other git
process is running and remove the file manually to continue.
'ls -l res/layout/view_about.xml' – Reactormonk 2012-03-30 17:33:49
@Tass:我有那个文件。问题是我失去了一些文件和版本。 Git说我修改并删除了一些文件,但我没有。我怎样才能恢复到以前的稳定版本,即最后一个git状态 – 2012-03-30 18:50:52
另一个进程是否打开了该文件?如果您不确定,请尝试重新启动后检查它。 – Andy 2012-03-30 18:59:13