Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Another git process seems to be running in this repository #683

Open
DuxSec opened this issue Jan 27, 2024 · 1 comment
Open

[Bug]: Another git process seems to be running in this repository #683

DuxSec opened this issue Jan 27, 2024 · 1 comment

Comments

@DuxSec
Copy link

DuxSec commented Jan 27, 2024

Describe the bug

Sometimes on startup of Obsidian, or after reboot (I am unsure), I get the following message
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 resolved this by manually deleting the appropriate index.lock in the .git folder of the project, but the error message keeps coming back every now and then.

Relevant errors (if available) from notifications or console (CTRL+SHIFT+I)

In dev console it shows up as this:

Uncaught (in promise) Error: fatal: Unable to create '/Users/<my_user>/Documents/obs-git-sync/obsidian-git-sync/.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.

    at Object.action (plugin:obsidian-git:29119:25)
    at PluginStore.exec (plugin:obsidian-git:29144:25)
    at eval (plugin:obsidian-git:26649:43)
    at new Promise (<anonymous>)
    at GitExecutorChain.handleTaskData (plugin:obsidian-git:26647:16)
    at GitExecutorChain.eval (plugin:obsidian-git:26631:44)
    at Generator.next (<anonymous>)
    at fulfilled (plugin:obsidian-git:25476:24)

After removing the index.lock file rm -f ./.git/index.lock I can commit and push normally again:

    git obsidian message: Everything is up-to-date
plugin:obsidian-git:44314 git obsidian message: Committed 7 files
plugin:obsidian-git:43862 Pushing....
plugin:obsidian-git:43864 Pushed! 7
plugin:obsidian-git:44314 git obsidian message: Pushed 7 files to remote
plugin:obsidian-git:44314 git obsidian message: No changes to commit
plugin:obsidian-git:44314 git obsidian message: No changes to push

Steps to reproduce

Have the git plugin working like normally, reboot / restart pc or obsidian (not sure which) and sometimes it will show the error message described.

Expected Behavior

Should not give the error and just work normally.

Addition context

Found thread in obsidian forums: https://forum.obsidian.md/t/obsidian-git-plugin-causing-error-in-git/75527

Operating system

macOS

Installation Method

None

Plugin version

2.22.2

@DuxSec
Copy link
Author

DuxSec commented May 7, 2024

Any update?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant