Hi,
 
I tried to reproduce the state of error locally. To this end, I created a local bare repository and pointed the HEAD reference to develop.
Then created two clones local1 and local2 with git clone. I added the file "new" and forced a push from local1, which wrote the following output:
 
+ b9a6353...7fcbdf3 develop -> develop (forced update)
 
Then I pulled the change in local2 from the bare repository:
 
   7fcbdf3..6809afd  develop    -> origin/develop
Updating 7fcbdf3..6809afd
Fast-forward
 new | 1 +
 1 file changed, 1 insertion(+)
 create mode 100644 new
 
So it works out of the box and does not reproduce the error message
" HEAD -> origin/HEAD (forced update) error: Ref refs/remotes/origin/develop ..."
 
The Git version on the server where the error occurs is different, though:
git version 1.6.3.2
I use Git version 1.9.1.
 
I doubt that the actual problem is related to the subdirectory in which the pull occurs, but will test it nontheless.
 
It would be great if you can explain the problem, or have an idea about what I can  try to reproduce the problem.
 
Thanks,
Joe
 
Gesendet: Donnerstag, 21. Januar 2016 um 11:30 Uhr
Von: "Ali Weis" <dersinndesleb...@gmx.net>
An: git-users@googlegroups.com
Betreff: [git-users] git pull HEAD -> origin/HEAD unexpected revision
Hi,
 
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
 
cd /GITREPO/SUBDIR1
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)
cd /GITREPO/SUBDIR2
git pull
>From ssh://git@HOST/proj/dir 1fd7513..992fe09 develop -> origin/develop Updating eb8af8d..992fe09 Fast forward [...]
cd /GITREPO/SUBDIR3
git pull
>From ssh://git@HOST/proj/dir + 992fe09...1fd7513 HEAD -> origin/HEAD (forced update) Already up-to-date.
 
Thanks,
Joe

 

--
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.

--
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