• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Low Low
    • None
    • 4.1.5
    • Git
    • None
    • Severity 2 - Major

      Since I've updated to the latest version, I see very often - for any operation - the following:

      fatal: Unable to create 'XXX/.git/index.lock': File exists.
      
      
      Another git process seems to be running in this repository, e.g.
      an editor opened by 'git commit'. Please make sure all processes
      are terminated then try again. If it still fails, a git process
      may have crashed in this repository earlier:
      remove the file manually to continue. 

      I've tried to:

      • Disable Source control in Xcode
      • Close Visual Studio Code

      with apparently no good results.

            [SRCTREE-7802] Unable to create index.lock, already exists

            The fix for this issue is available in Sourcetree 4.2.4.
            You could upgrade your Sourcetree via "Check For Updates" feature or directly download it from official website.
            Thanks.

            Raman Sidarakin (Inactive) added a comment - The fix for this issue is available in Sourcetree 4.2.4. You could upgrade your Sourcetree via "Check For Updates" feature or directly download it from official website. Thanks.

            Inder added a comment -

            I enabled the debug menu and found that adding file to staging runs around 30+ commands on the Task monitor. I looked for other GUI tools and seems Forks is similar to source tree and doesn't have this issue

            Inder added a comment - I enabled the debug menu and found that adding file to staging runs around 30+ commands on the Task monitor. I looked for other GUI tools and seems Forks is similar to source tree and doesn't have this issue

            Inder added a comment -

            ~/.gitconfig content

             

            [core]

            excludesfile = /Users/inder.kumar/.gitignore_global

             

            my ~/.gitignore_global  content

            *~

            .DS_Store

            index.lock

            Inder added a comment - ~/.gitconfig content   [core] excludesfile = /Users/inder.kumar/.gitignore_global   my ~/ .gitignore_global  content *~ .DS_Store index.lock

            Hi 4089ac6740a4 could you kindly check if you also have added "excludefile" in .gitconfig

            Arati Mohanty added a comment - Hi 4089ac6740a4 could you kindly check if you also have added "excludefile" in .gitconfig

            Inder added a comment -

            Hi @Arati I added the index.lock file in local .gitignore file and this workaround is not solving the issue

            Inder added a comment - Hi @Arati I added the index.lock file in local .gitignore file and this workaround is not solving the issue

            4089ac6740a4 We understand that this issue is existing in Sourcetree. We will be working towards fixing the bug and update the ticket once it is ready.
            Meanwhile, we can suggest you to try out this which will fix the issue.
            Try to include the index.lock file in gitignore file. Also, the ".gitconfig" file in the home folder has to be extended by the parameter "excludesfile" in "[core]" section that points to the global "gitignore" file. The other possibility is to have a gitignore file in root folder of each repository.

            Arati Mohanty added a comment - 4089ac6740a4 We understand that this issue is existing in Sourcetree. We will be working towards fixing the bug and update the ticket once it is ready. Meanwhile, we can suggest you to try out this which will fix the issue. Try to include the index.lock file in gitignore file. Also, the ".gitconfig" file in the home folder has to be extended by the parameter "excludesfile" in " [core] " section that points to the global "gitignore" file. The other possibility is to have a gitignore file in root folder of each repository.

            Inder added a comment - - edited

            The source tree is un usable, I can't move files from unstaged to staged back to back by pressing space bar. It throws this error 95% of the time. The work around is to wait for 2 or 3 seconds and then add the file. Not sure why this process is so slow. This is frustrating. It's going to be almost one year and this is still not fixed.

             

            I'm on latest version `4.2.0` on M1 machine

            Inder added a comment - - edited The source tree is un usable, I can't move files from unstaged to staged back to back by pressing space bar. It throws this error 95% of the time. The work around is to wait for 2 or 3 seconds and then add the file. Not sure why this process is so slow. This is frustrating. It's going to be almost one year and this is still not fixed.   I'm on latest version `4.2.0` on M1 machine

            andres.luque added a comment - - edited

            This affects all latest versions for months now. Even with automatic update off, sourcetree is barely usable. Here I am using 4.2.0 (246)

            andres.luque added a comment - - edited This affects all latest versions for months now. Even with automatic update off, sourcetree is barely usable. Here I am using 4.2.0 (246)

            I'm having the same issue

             

            I'm on version 4.1.9

            Jimmy Van Broeck added a comment - I'm having the same issue   I'm on version 4.1.9

            Jeffrey Huston added a comment - - edited

            I've been seeing this a lot since sometime this year. Currently on 4.1.7 and still having the issue. It happens about 10-20% of the time when I drag files from Unstaged to Staged. Very frustrating. Then I have to try dragging again (which still fails about 10-20% of the time).

            Do you have any tips on how to understand what else might be running? It may well not be a SourceTree problem, but it's causing me to experiment with alternatives. So far, in pretty limited experiments (straight command line, and using the Git features in Android Studio), I haven't seen this issue occur except when I'm using SourceTree.

            Jeffrey Huston added a comment - - edited I've been seeing this a lot since sometime this year. Currently on 4.1.7 and still having the issue. It happens about 10-20% of the time when I drag files from Unstaged to Staged. Very frustrating. Then I have to try dragging again (which still fails about 10-20% of the time). Do you have any tips on how to understand what else might be running? It may well not be a SourceTree problem, but it's causing me to experiment with alternatives. So far, in pretty limited experiments (straight command line, and using the Git features in Android Studio), I haven't seen this issue occur except when I'm using SourceTree.

              Unassigned Unassigned
              d0e511ada54c daniele-pizziconi
              Affected customers:
              6 This affects my team
              Watchers:
              16 Start watching this issue

                Created:
                Updated:
                Resolved: