You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am seeing following error during repo.index.commit.
OSError: Reference at 'refs/heads/master' does already exist, pointing to u'f746fc427841706fd2ba4302b99c7ae6eb135ab8', requested was 'f428c16e68aa324f24e222269c95f5c24a38db43'
After this error, file has been committed to this repository, if I do a git clone, I can see updated file. But git log will not show this update.
This is a repository only contains one text file which is around 500k. This is not always happen.
I am wondering what is this log indicating and how to prevent it.
Thanks for your attention.
The text was updated successfully, but these errors were encountered:
I got that error when trying to create a local branch or head using a remote reference, while the head already existed in my local repo and my local repo was pointing to a past commit. To solve it I just checked if the branch already existed in the repo.heads like
def_create_head_master_from_origin(self):
ifnot'master'inself.repo.heads:
self.logger.debug("Creating local master branch")
self.repo.create_head('master', self.origin.refs.master)
self.repo.heads.master.set_tracking_branch(self.origin.refs.master)
If it already existed just switched to that head and updated it with a pull.
I am seeing following error during repo.index.commit.
OSError: Reference at 'refs/heads/master' does already exist, pointing to u'f746fc427841706fd2ba4302b99c7ae6eb135ab8', requested was 'f428c16e68aa324f24e222269c95f5c24a38db43'
After this error, file has been committed to this repository, if I do a git clone, I can see updated file. But git log will not show this update.
This is a repository only contains one text file which is around 500k. This is not always happen.
I am wondering what is this log indicating and how to prevent it.
Thanks for your attention.
The text was updated successfully, but these errors were encountered: