git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Git repo on a machine with zero commits is ahead of remote by 103 commits.. !

From
SDSrirang Doddihal <om.brahmana@gmail.com>
Date
Jan 25, 2011, 05:48 UTC
Message-ID
<AANLkTikj06sjTbNd8afk9cY2=_Hy+kT+J1NCjR-fKP5J@mail.gmail.com>
Hi,

I am using a simple git based deployment for my rails app and here is my setup and current status:

1) Git repo initialized on my local development machine with a sample file.
2) Pushed to remote repo on Github.com
3) Subsequent pushes and pulls made from local development machine
4) Repository cloned on the deployed machine
5) Subsequent pulls made from the deployed machine (but no commits or
pushes are made on this machine)
Now when I run "git status" on the deployed machine it says :

# On branch master # Your branch is ahead of 'origin/master' by 103 commits.

git pull origin master -- says it is Already up to date
git log -- appropriately shows till the latest commit
however
git log orign/master -- shows commits only till Jan 8th.
also

git rev-parse origin/master -- give different SHA1 values on my development machine and the deployed machine.

Questions:
===========
1) Why does "git status"  say that the local repo on the deployed
machine (where no commits are made) is ahead of the remote by 103
commits? (This number, 103, increases with every "git pull origin
master" and very likely the change is equal to the number of commits
pulled)
2) Why is "git log orign/master" stuck at a Jan 8th commit?
* How can I set these right?

Even with these anomalies, "git pull origin master" on the deployed machine seems to be working just fine, in terms of the right revisions of files being pulled in and all that.

Any help in understanding what caused these anomalies and suggestions to fix then would be very helpful. Kindly let me know if any more information is needed.

-- 
Regards,
Srirang G Doddihal
Brahmana.

The LIGHT shows the way.
The WISE see it.
The BRAVE walk it.
The PERSISTENT endure and complete it.

I want to do it all ALONE.
Next: Johannes Sixt
Message 1 of 4 in “Git repo on a machine with zero commits is ahead of remote by 103 commits.. !”
  1. Srirang DoddihalJan 25, 2011
  2. Johannes SixtJan 25, 2011
  3. Jay SoffianJan 25, 2011
  4. Srirang DoddihalJan 25, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.