I am analysing a workflow that consists of looping through paths and pulling updates with git pull.
It also iterates through several directories of the same repository, which, to me, seems to be redundant.
But the following occurs. On the first pull there is an error, and git says it tries to update origin/HEAD and not the origin/develop branch.
On the second try, in another subdirectory, it now tries to update the origin/develop branch as expected, and it works.
Now in the third directory, it again tries to update origin/HEAD and succeeds.
Please explain why the git pull changes between origin/HEAD and origin/develop, and why it fails first, but succeeds on the next try.
Afaik, the following output shows that origin/develop is the HEAD of the remote repository.
git -branch -avv
remotes/origin/HEAD                   -> origin/develop
git pull
>From ssh://git@HOST/proj/dir + eb8af8d...1fd7513 HEAD -> origin/HEAD (forced update) error: Ref refs/remotes/origin/develop is at 1fd751390d3fa2c39538a48b73f62f85eeea220d but expected eb8af8dfb6b8e363674ef4423830b97ff2f12df3 ! eb8af8d..992fe09 develop -> origin/develop (unable to update local ref)
git pull
>From ssh://git@HOST/proj/dir 1fd7513..992fe09 develop -> origin/develop Updating eb8af8d..992fe09 Fast forward [...]
git pull
>From ssh://git@HOST/proj/dir + 992fe09...1fd7513 HEAD -> origin/HEAD (forced update) Already up-to-date.

You received this message because you are subscribed to the Google Groups "Git for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to