Git push quirks - How To

I have experience with a number of distributed version control systems (DVCS) including Darcs, BitKeeper, Mercuial, Bazaar and now Git.

Git has a lot going for it, so I've decided to "lease" my soul to it for version control.

Git has some quirks, however. One of them is the notion of "push". Git's push doesn't work as I've come to expect in other DVCSes. Here's a good posting on this quirkiness :


The Git groupies say "Don't use push - use fetch or pull." This is fine, except when your source is behind a NATed firewall and you have to push to your target rather than pull into your target.

The Git FAQ provides this answer for the "push from behind a NATed firewall" problem :


However, the procedure is too abstract/obtuse for this Git newbie.

Here's what I found to be the best (simplest) way to push with Git :


I'll see if I can come up with some examples.


Here is the way I currently push with Git :