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

{Spam?} Re: push pull not working

From
RBRick Bragg <lists@gmnet.net>
Date
Jan 24, 2012, 20:05 UTC
Message-ID
<1327435530.21582.211.camel@thor>
In-Reply-To
<20120124194153.GB19534@sigill.intra.peff.net>
On Tue, 2012-01-24 at 14:41 -0500, Jeff King wrote:
Show 33 quoted lines
> On Tue, Jan 24, 2012 at 02:00:31PM -0500, Rick Bragg wrote:
> 
> > I cloned a repo from /home/me/repo1 to /home/me/repo2.  Then made
> > changes and a new commit on repo1, then from repo1 did "git
> > push /home/me/repo2 and it says Everything is up-to-date.  How could
> > this be?
> 
> It's hard to say, since you didn't show us the exact commands you ran.
> 
> One possible cause is that you made your commit on a detached HEAD, not
> on a branch, and therefore pushing branches will have no effect. You can
> check this by running "git status", which will report either your
> current branch or "not currently on any branch".
> 
> Another possible cause is that git is not trying to push the branches
> that you think it is.
> 
> For example, imagine repo1 has two branches, "master" and "foo", and the
> "master" branch is checked out. When you clone it, the resulting repo2
> will have remote-tracking branches for both "master" and "foo", but will
> only checkout the "master" branch. Now imagine you make commits on
> "foo" in repo1, and then try to push. Git's default behavior is to push
> only branches which match (by name) a branch on the destination. So we
> would attempt to push "master" (which is up to date), but not "foo".
> 
> You can see which branches are being considered in the push with "git
> push -vv". If you want to push all branches, you can use "git push
> --all", or read up on refspecs in "git help push". If you want to change
> git-push's default behavior, read up on "push.default" in "git help
> config".
> 
> -Peff
> 

Thanks, I went back a few commits and tried again and it works. I'm not sure what it was, I will have allot of reading to do.

Thanks again! Rick

Previous: Jeff KingNext: Junio C Hamano
Message 3 of 6 in “{Spam?} push pull not working”
  1. Rick BraggJan 24, 2012
  2. Jeff KingJan 24, 2012
  3. {Spam?} Re: push pull not workingRick Bragg, Jan 24, 2012
  4. Junio C HamanoJan 24, 2012
  5. Jeff KingJan 24, 2012
  6. Junio C HamanoJan 24, 2012

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.