From: Martin Koegler Date: Fri, 07 Nov 2008 08:26:29 GMT Subject: git-push and $GIT_DIR/branches Message-ID: <20081107082629.GA27158@auto.tuwien.ac.at> I think, that the git-push behaviour is a bit unlogical in conjunction with $GIT_DIR/branches. If $GIT_DIR/branches/name1 contains "#name2": - git-fetch name1 will fetch refs/heads/name2 from and store it in refs/heads/name1 - git-push name1 will push refs/heads/master to refs/heads/master in I would expect, that git-push would somehow honour #name2. As far as I remember, cg-push name1 would have pushed HEAD to refs/heads/name2 in . In remote.c, function read_branches_file the following code would implement a similar behaviour: strbuf_init(&push, 0); strbuf_addstr(&push, "HEAD"); if (frag) { strbuf_addf(&push, ":refs/heads/%s", frag); } else strbuf_addstr(&push, ":refs/heads/master"); add_push_refspec(remote, strbuf_detach(&push, 0)); Options about this? mfg Martin Kögler