English 中文(简体)
吉唐-致命:无法创造/pa/米_项目/.git/index.lock : 档案
原标题:Git - fatal: Unable to create /path/my_project/.git/index.lock : File exists
  • 时间:2011-10-22 16:03:54
  •  标签:
  • git

在我试图把我的项目树推向树脂时,我仍在获得这一错误信息。

我检查了我的目录对这个项目的许可,这些许可定为777份。 载于<代码>my_project 的终端 页: 1

<

然后,我尝试

<代码>git 添加

<代码>git commitments -m “first upload”

so I ll get the err或

fatal: Unable to create  /path/my_proj/.git/index.lock : File exists.

If no other git process is currently running, this probably means a git process crashed in this reposit或y earlier. 
Make sure no other git process is running and remove the file manually to continue.

I tried also create a new repo and there to commit it, but unf或tunately still the same err或 message.

问题的原因是什么?

最佳回答

提 出

rm -f ./.git/index.lock

您的存放名录。 错误信息相当明确,其原因何在,因此,如果你没有其他轮用程序(通常情况),就会继续并删除这一档案。

问题回答

在Windows,指挥部门从邮局接手:

cd .git
del index.lock

UPDATE: I have found that I don t need to do this procedure if I wait a moment after I close out the files I m working on before I try to switch branches. I think sometimes this issue occurs due to git catching up with a slow file system. Other, more git-knowledgeable developers can chime in if they think this is correct.

关闭X条码——因为X条码是一个客体,你必须放弃X条码,以避免在指挥线上出现麻烦。

在我的目录中,没有指数。 锁档案。 因此,利用Gite Bash的炮弹,我跑......

cd .git
touch index.lock
rm index.lock

触动指挥部建立了档案,问题消失了。

我也存在同样的问题。 审判

rm -f ./.git/index.lock 

而独角兽给我一个错误的信息。 然后,我审判

rm --force ./.git/index.lock

这一点行之有效。

Good Luck! This works super

您需要删除索引。

Inosphere

cd .git
rm -f index.lock

在Windows(10)中,指挥部门从邮局接手:

cd .git
del index.lock

您是否使用<代码>root用户意外创建该存放处?

当时我建立了“顶点”储存库,作为<代码>root的用户。

我删除了该盖特存放处,并在没有<代码>sudo的情况下再次设立该存放处,并投入使用。

i 这个问题也存在,而且确实是一个许可问题。 (一) 这样做:

sudo chown -R : .git #change group
sudo chmod -R 775 .git #change permission

那么,痛苦是巨大的,gaa是成功的。

and then i use gp, i get another error almost the same error

sudo chown -R "${USER:-$(id -un)}" . #use this can fix the problem

在Windows,我只设法在结束任务后删除工作队主管所有GiteWindows(32bit)过程的锁文档。

<>Solution (Win 10)

1. End Task for all GitWindows (32bit) processes in the Task Manager

<>2. 删除.git/index. 锁档案

  1. Run Task Manager, Locate Git for windows process and kill it.
  2. Delete index.lock file under .git folder
  3. It worked for me !

澳门办事处 指挥部门从邮递目录中抽出:

cd .git
rm index.lock

给我工作的解决办法是关闭下层案文,因为编辑启动了轮.程序。

在你尝试之后:

rm -f./.git/index.lock

您:

护堤:不能不挂钩指数。 驳回的申请

Try closing all software that might be using Git. I had Source Tree and Visual Studio opened and after closing both the command worked.

我认为,解决办法比删除档案(并且知道在删除/翻造一个档案时将发生什么情况):

git gc

如果您使用<代码>#intelliJ。 IDEs and receive this msg (i m using #webtorm), 请指出,这一问题可能由于隐藏项目夹之一(在环境中)而出现,从而防止从合并中删除

In my case the solution was to wait 5 minutes. Obviously my previous operation was still running but I just didn t know it. I was using tortoise git on windows.

如果它是一个分层,则在您的存放名录上尝试:

rm -f ../.git/modules/submodule-name/index.lock

change submodules-name to your submodule name.

使用:

rm -Force ./.git/index.lock

DO NOT USE the Atom platformio-atom-ide-terminal Plugin to do this. USE THE TERMINAL OF YOUR DISTRO DIRECTLY.

我保留了这一错误,同时重新调整/清点承诺,并不知道为什么是因为我曾多次这样做。

无论何时,我都会删除<代码>index.lock文档。

引证是因为我使用了ATOM EDITOR 起端 plugin。 一旦我使用乌兰巴托船舶的码头,它就象一个药店。

You have problem with .git/index.lock so delete it using below command.

<<>Command>:

sudo rm -rf .git/index.lock

我用多种方法对其进行审判,但为我工作(我使用PyCharm码头):

$ cd .git/

$ rm -f index.lock

随后,我再次试图制造一个空洞的 re:

$ git init

$ git add .

$ git commit -m "commit msg"

解决这一问题的办法是在名录中复制三条编码/项目档案,然后创建新的目录(视情况而定),然后复制这三份档案/档案。

Also we can just kill git process. I receive the same issue via GUI app for git, something goes wrong and git makes some work infinitely. Killing process will freeze application that works with git, just restart it and everything will be ok.

无论出于何种原因,你都从一个被云层服务(透水箱、驱动器、一次性沉降等)混为一谈的夹子中做了重新定位,因为这样做会干扰重新基底的许可。

对我来说,

rm -r .git-credentials.lock 

我修改了我的名录许可,因此我知道可以允许。 在我的案件中,我删除了不想要(www)的用户,然后通过对所有内容适用修改对每个人适用读/礼许可。 澳门

Directory Permission on Mac

所有撤走的指挥机构都对我做了一些工作,我这样做的是,利用盖特提供的道路,然后用人工删除。

如果有人使用鸡肉,我有同样的问题,但不能删除档案,因为没有。 在检查许可、查阅档案和删除文件之后,我不记得其他情况,这确实是:

  • checkout the master branch.
  • git svn rebase (on master)
  • checkout the branch you were working on
  • git svn rebase

还有一点,因为我不得不使用不同的答案来找到实际解决办法(对我来说)。

www.un.org/Depts/DGACM/index_spanish.htm 这对我来说就是这样:。

  1. Open branch you are working on
  2. Open terminal (I use terminal in Git GUI)
  3. Typ in command: cd .git
  4. Typ in command: rm -f index.lock

有些人可能不得不使用<条码>- 强制性而不是<条码>-f。 可以通过在您的终点站执行指挥系统来检查您的终点站的指挥线,例如<代码>git 帮助。

simply go to D:/project/androidgc/.git/ this directory and delete index.lock this worked for me.





相关问题
git confusion - cloning a repo is returning a past version

Im having some confusion with my git usage. I cloned a repo from one comp to the other, and the new clone is the state of the original that was active some time ago. So its cloning a past version. ...

Appropriate strategy for tagging and hotfixing with git

I was wondering if the strategy I m using for tagging and hotfixing tags (which then I use for deploying rails applications) with git is appropriate. For tagging I just tag a commit of the master ...

Tips on upgrading CVS to git/hg?

We still use CVS, I use git and hg for my personal use though I m still a novice at both, but I realize they re much more modern and better, faster, distributed, etc. It s just everyone is so ...

Using Git in a TFS shop

Using Git at home has spoiled me - I now find using TFS at work to be a bit of a drag and want to explore the possibility of using Git locally and syncing somehow with TFS. I figure there are a few ...

热门标签