From: Rick Bragg <lists@gmnet.net>
To: Jeff King <peff@peff.net>
Cc: GIT Mailing-list <git@vger.kernel.org>
Subject: {Spam?} Re: push pull not working
Date: Tue, 24 Jan 2012 15:05:30 -0500 [thread overview]
Message-ID: <1327435530.21582.211.camel@thor> (raw)
In-Reply-To: <20120124194153.GB19534@sigill.intra.peff.net>
On Tue, 2012-01-24 at 14:41 -0500, Jeff King wrote:
> 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
next prev parent reply other threads:[~2012-01-24 20:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-24 19:00 {Spam?} push pull not working Rick Bragg
2012-01-24 19:41 ` Jeff King
2012-01-24 20:05 ` Rick Bragg [this message]
2012-01-24 20:12 ` Junio C Hamano
2012-01-24 20:18 ` Jeff King
2012-01-24 20:28 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1327435530.21582.211.camel@thor \
--to=lists@gmnet.net \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.