Wondering about integrity behaviour

Akito
Akito
I am using Git all over my projects, for a long time, however there is 1 project, which is quite big, that causes some unexpected behaviour from time to time. [CODE]error: cannot lock ref 'refs/remotes/bitbucket/mailimport1100': is at 143d54aa12 but expected 9ec2c2baff From bitbucket.org:org/repo ! 9ec2c2baff mailimport1100 -> bitbucket/mailimport1100 (unable to update local ref)[/CODE] I can "solve" this problem with a [CODE]git remote prune[/CODE]. Now the issue is, that this happens very often and I'd like to know what could be the cause of this. Usually, I work with smaller projects and not with Bitbucket. That's the only difference between this project, where the issue occurs, and the other projects, where I have never seen the issue before. If a single [CODE]git remote prune[/CODE] would fix it for good, then it wouldn't be an issue, but why do I have to run this command so often to fix the faulty differences between the local and remote repository?

Last updated

DougR
DougR
What version of Git are you using on your client? The reason that I ask is that the "git remote prune" command is removing references in your clone to remotes that do not exist at the remote (upstream). A while back there was a change to the Git client such that it will only push up to the remote the explicit ref you're working on or you list out (it used to update them all). Or you may need to check your Git config files to make sure that you've got a sensible value for "push.default" (most of the time "simple" - the default - is what you want).

1-2 of 2

Reply to this discussion

You cannot edit posts or make replies: You should be logged in before you can post.

Post a reply
277 views