I received the git repository in a state in which I do not know how to access it, and I need help understanding what is happening, how and why the repository is in this state, and b) how should I react to it. Basically, when removing from the remote, I end up in front of the remote, even if I reset all the changes and try again.
This is what I did:
I unpacked the git repository, cloned the upstream version (to which I do not have write access), and then added my own plug to the list of remotes, so git remote -v shows the following:
$ git remote -v mine git@github.com :tlycken/julia.git (fetch) mine git@github.com :tlycken/julia.git (push) origin git://github.com/JuliaLang/julia.git (fetch) origin git://github.com/JuliaLang/julia.git (push)
Now I want to make sure my local version is updated using everything in the upstream repository, so I run
$ git pull origin master From git://github.com/JuliaLang/julia * branch master -> FETCH_HEAD Already up-to-date. tlycken$ git status
It bothers me. Why is my branch ahead of the host of origin? I have not changed anything.
To find out if I can do something about this, I launched git lg (an alias for git log --graph with some pattern). The top of the output is as follows:
* 6912a42 - (HEAD, mine/master, master) Merge pull request #3052 from daviddelaat/linalgnumber (2013-05-10 11:23:09 -0700) <Viral B. Shah> |\ | * 8116d51 - Use Number instead of Integer in some linalg operations (2013-05-10 19:12:45 +0200) <David de Laat> * | 6cc1532 - Update .travis.yml configuration in the manual. (2013-05-10 21:41:59 +0530) <Viral B. Shah> * | fa1e3fe - Update logdet. Close #3070. (2013-05-10 19:35:37 +0530) <Viral B. Shah> * | a182f7f - (origin/master, origin/HEAD, mine/contrib-base) Merge branch 'master' of github.com:JuliaLang/julia (2013-05-10 03:10:38 -0400) <Jeff Bezanson>
HEAD appears to be in different positions. To make sure I got the correct code in my local repository, before starting forking, I did git reset --hard origin/HEAD to remove everything that was in front, and then git pull origin master to make sure that I was up to date (i.e. w70> too far or something else):
$ git pull origin master From git://github.com/JuliaLang/julia * branch master -> FETCH_HEAD Updating a182f7f..6912a42 Fast-forward base/linalg/dense.jl | 2 +- base/linalg/factorization.jl | 44 ++++++++++++++++++++++---------------------- doc/manual/packages.rst | 3 +-- 3 files changed, 24 insertions(+), 25 deletions(-) $ git status
and I went back to where I started.
What's going on here? What do I need to do to get into a state in which my local master has the latest updates from the upstream?