环境:Win8.1使用Git CMDgit的承诺挂在1KB的文件提交
所以我一直在试图敲定Git的片状我的Windows机器上。我能够将远程仓库克隆到新的新目录中。 github回购内容是在我的Mac上创建的,如果这有什么不同。我将一个1kb的文本文件添加到Windows本地名为Add_file.txt中。我似乎能够添加文件,但不提交没有git commit挂起的文件。
如何追踪引擎盖下发生的事情,弄清为什么我无法做到这一点?我曾经反复尝试过这个程序。如果我在此时杀死ctrl + c,那么会留下一个git锁定文件,以防止在本地进一步发出git命令。删除git锁定文件并不能解决无法进行git commit的问题。
任何想法?
C:\Users\mylocaluser\Documents\GitHub>git clone https://github.com/mygitaccount/99_Gitbug.git
Cloning into '99_Gitbug'...
remote: Counting objects: 11, done.
remote: Compressing objects: 100% (7/7), done.
remote: Total 11 (delta 1), reused 11 (delta 1), pack-reused 0
Unpacking objects: 100% (11/11), done.
C:\Users\mylocaluser\Documents\GitHub>cd 99_Gitbug
C:\Users\mylocaluser\Documents\GitHub\99_Gitbug>git status
On branch master
Your branch is up-to-date with 'origin/master'.
Untracked files:
(use "git add <file>..." to include in what will be committed)
Add_file.txt
nothing added to commit but untracked files present (use "git add" to track)
C:\Users\mylocaluser\Documents\GitHub\99_Gitbug>git add Add_file.txt
C:\Users\mylocaluser\Documents\GitHub\99_Gitbug>git status
On branch master
Your branch is up-to-date with 'origin/master'.
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
new file: Add_file.txt
C:\Users\mylocaluser\Documents\GitHub\99_Gitbug>git commit -m "6th commit to local WIN repo"
我没有Windows专家(我避免它尽可能),但在一般情况下,窗口时一些进程持有的OS级锁(从Git的锁定不同的行为这样你正在删除的文件),另一个进程尝试使用该文件。查看是否有后台打开文件的命令。 (或者,你可以使用“你试过把它关掉再打开”的大锤子:-)即重新启动......) – torek
是的,在发布请求帮助之后,我尝试卸载/安装所有GIT组件。这是多次尝试后,文件/目录删除,重新启动。重新安装后,片状会变差1步...从git外壳的git克隆也挂起。克隆为远程回购创建了一个目录,在目录中创建了.git文件,但尽管shell&last命令运行了1小时,远程回购测试文件从未写入目标目录。当时没有其他软件打开,所以如果有东西在锁定git活动,我不知道它是什么。我需要备份一步并找出git记录。 –
git commit挂起问题仍未解决。通过使用HTTP而不是HTTPS远程回购URL解决了git克隆问题。 –