[TYPO3-v4] Git: what to do when a branch "diverges"?

François Suter fsu-lists at cobweb.ch
Tue Mar 8 09:43:06 CET 2011


Hi,

> fetch doesn't make a commit, so after fetch your last commit is still
> behind the HEAD.
> pull does a fetch + commit, so this is the way i do always to be up to
> date. Don't be afraid, you can do this many times.
> If pull doesn't solve it, try pull --rebase

Thanks for trying to help, but that's not what I was asking about at 
all. Maybe I wasn't clear enough, let me try again. Here's the "history":

1) a couple of day ago I prepared a patch. I created a branch based on 
origin/master, wrote my patch and committed it.
2) I didn't push the change back then, because I had access problems to 
Gerrit.
3) today (a couple of days later), I want to try and push again because 
I have some reasons to believe that my access problems are solved.
4) since I know that I'm probably out of date by now, I did a "git fetch 
--all".
5) when I do a "git status" now, I get the following information:

> # On branch issue_17815
> # Your branch and 'origin/master' have diverged,
> # and have 1 and 11 different commit(s) each, respectively.
> #
> nothing to commit (working directory clean)

Hence my question: may I go ahead and push? Or do I need to worry about 
the divergence mentioned by git?

Cheers

-- 

Francois Suter
Cobweb Development Sarl - http://www.cobweb.ch


More information about the TYPO3-project-v4 mailing list