On Dec 4, 2007, at 10:44 PM, g2 wrote:
What I am gathering from this is that I can use git in two ways: 1)
as "just another svn" bare git repository, or 2) only pull and don't
push, because push causes confusion. I'd be happy to only ever use
pull, but I have one machine behind a firewall and can't pull. I can
push to a bare git repository like the svn model, but then I would
just use svn. What's the value of "push" then?
You can push. Just don't push to a checked-out branch. I do exactly
what you're describing and it works fine. It looks something like this:
server% git checkout mybranch
server% edit somefile.c
server% git commit
laptop% git checkout mybranch
laptop% git pull
(with a pull configuration that pulls server's mybranch into
laptop's)
laptop% edit somefile.c
laptop% git commit
laptop% git push server mybranch:laptop/mybranch
server% git checkout mybranch
server% git rebase laptop/mybranch
Presto, ready to go. The trick is to push into a branch that's
different from the one that's checked out, then rebase on top of that
on the remote side after the push.
Yeah, it'd be nicer if you could just push to the checked-out branch
directly (and there are hooks to let you do that) but this is only
slightly awkward and it's easy once you've done it a few times.
-Steve
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html