0

When I type git show-ref from a repo I get HASH-B (placeholder for an actual hash) for the refs/heads/master but HASH-A for the refs/remotes/origin/master. These are both bare repos. When I do a fetch or fetch --all, it says "Fetching origin", but nothing else.

What could be going on? Why might this fetch not be occurring?

EmpireJones
  • 2,936
  • 4
  • 29
  • 43

2 Answers2

2

According to your comments in Ryan's answer it looks like you need to merge your master with origin/master. You can do a git pull, instead of git fetch, or from your master, do a git merge origin/master

git pull does a fetch and than merge, whereas git fetch just fetches the remote branches, but doesn't merge them.

Andy
  • 44,610
  • 13
  • 70
  • 69
  • But you can't do a merge or pull in a bare repo. Do I need to create a clone of the bare downstream, merge with the upstream, then push to the downstream, followed by the upstream? – EmpireJones Aug 05 '11 at 04:21
  • 1
    [Here](http://stackoverflow.com/questions/5559321/fetch-all-in-a-git-bare-repository-doesnt-synchronize-local-branches-to-the) is another question that I think describes your situation. If it doesn't I'll agree with Ryan that you need to update/clarify your question. – Andy Aug 05 '11 at 04:54
0

What could be going on?

You don't seem to have given any conflicting information. master and origin/master can and regularly do point at different commits, and once you've fetched from a remote, successive fetches give no output. What's the problem?

Ryan Stewart
  • 126,015
  • 21
  • 180
  • 199
  • So I checked in a change to the parent repo and am trying to get it to the child repo, but the change is not propagating. How do I get the change to the child repo? [ and by parent I believe I am referring to upstream ] – EmpireJones Aug 05 '11 at 03:34
  • 1
    You'll have to show some information. Update your question with, for instance, the output of `git log --oneline master` on both repos and of `git remote -v` on the repo you're trying to fetch into (not from) and other relevant information you can think of. – Ryan Stewart Aug 05 '11 at 03:53