I am working on a branch, foo
. I have no unstaged changes, no working changes, perfectly clean state, where HEAD
== foo
== origin/foo
according to my box.
$ git status
# On branch foo
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# some_irrelevant_file_here
$ git log --pretty=...
* 456520c 2015-02-13 (HEAD, origin/foo, foo) Commit A
* 23bfcd1 2015-02-11 Commit B
* b0bdd18 2015-02-12 Commit C
I am then asked to look at some changes that a colleague pushed, so I do:
$ git pull --rebase origin foo
remote: Counting objects: 47, done.
remote: Compressing objects: 100% (34/34), done.
remote: Total 36 (delta 22), reused 0 (delta 0)
Unpacking objects: 100% (36/36), done.
From ...
* branch foo -> FETCH_HEAD
First, rewinding head to replay your work on top of it...
Fast-forwarded foo to 43dad88c737762e0f1e84fdcd135155080bdce2a.
At this point, my graph looks like:
$ git log --pretty=...
* 43dad88 2015-02-13 (HEAD, foo) Commit D
* 40039f9 2015-02-13 Commit E
* 456520c 2015-02-13 (origin/foo) Commit A
* 23bfcd1 2015-02-11 Commit B
* b0bdd18 2015-02-12 Commit C
Why does it look like my local foo
is ahead of origin/foo
? Neither D
nor E
are my commits, I just pulled both of those from origin
- I'd expect at this point to still have HEAD
== foo
== origin/foo
.