Hi,
Sorry, of course I meant "fetch". :-)
Sorry for confusion: I replaced my local branch with the one from origin. There
are several ways to do this:
- Your solution with fetch and then hard reset
- Delete local branch and then pull or fetch
The history is not diverged, I checked this :-) I know how this looks like in
the log viewer!
The Jenkins servers were also handling this correct (they did exactly what you
said), just a bit more complicated to be prepared to such hard shit (and also
to clean up working copy to the completely resettled state):
Building remotely on lucene in workspace
/home/jenkins/jenkins-slave/workspace/Lucene-Solr-Tests-5.x-Java7
> git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> git config remote.origin.url git://git.apache.org/lucene-solr.git #
> timeout=10
Cleaning workspace
> git rev-parse --verify HEAD # timeout=10
Resetting working tree
> git reset --hard # timeout=10
> git clean -fdx # timeout=10
Fetching upstream changes from git://git.apache.org/lucene-solr.git
> git --version # timeout=10
> git -c core.askpass=true fetch --tags --progress
> git://git.apache.org/lucene-solr.git +refs/heads/*:refs/remotes/origin/*
> git rev-parse refs/remotes/origin/branch_5x^{commit} # timeout=10
> git rev-parse refs/remotes/origin/origin/branch_5x^{commit} # timeout=10
Checking out Revision 104f7c9c938939e829782410958a302574e4d5a4
(refs/remotes/origin/branch_5x)
> git config core.sparsecheckout # timeout=10
> git checkout -f 104f7c9c938939e829782410958a302574e4d5a4
> git rev-list 1ebe07b770a72ad1a03a35a1d8ab7b09b5331323 # timeout=10
Uwe
-
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: u...@thetaphi.de
> -Original Message-
> From: Dawid Weiss [mailto:dawid.we...@gmail.com]
> Sent: Sunday, January 24, 2016 6:39 PM
> To: dev@lucene.apache.org
> Subject: Re: Branches branch_5x and master have force-updated heads (!)
>
> > (as I had no changes in my checkout, I just pulled the branches from
> remote replacing the local one)
>
> I don't know what you did, but it it wasn't pulling ;) Here is a bit
> of git parlance overview:
>
> - You "fetch" new commits and reference updates (git fetch origin).
> - A "pull" is basically fetch + merge remote tracking branch.
>
> If you did in fact pull then you should see diverged history (your
> local branch reference and the remote it's tracking wouldn't be on the
> same commit). Something like this:
>
> $ git status
>
> # On branch master
> # Your branch and 'origin/master' have diverged,
> # and have 3 and 9 different commits each, respectively.
> # (use "git pull" to merge the remote branch into yours)
>
> Perhaps what you did was you "reset" the local branch (reference) to
> the updated remote? If you didn't (and you know you didn't have any
> commits) you should reset it:
>
> git fetch origin
> git checkout master
> git reset --hard origin/master
> git checkout branch_5x
> git reset --hard origin/branch_5x
>
> This ensures your local branch references are pointing at the latest
> commits on their remote counterparts.
>
> Dawid
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
> For additional commands, e-mail: dev-h...@lucene.apache.org
-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org