{"thread":{"id":"34019","subject":"Setting of push.default or confusion about refspecs","startedAt":"2013-06-03T22:01:41Z","lastAt":"2013-06-03T23:21:38Z","messageCount":2,"participants":["Kendall Shaw"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"219307","messageId":"51AD1245.9050202@kendallshaw.com","threadId":"34019","inReplyTo":null,"subject":"Setting of push.default or confusion about refspecs","fromName":"Kendall Shaw","fromEmail":"kshaw@kendallshaw.com","sentAt":"2013-06-03T22:01:41Z","receivedAt":"2013-06-03T22:01:41Z","isPatch":false,"sender":{"key":"kshaw@kendallshaw.com","avatar":null},"body":"I am setting up a git repository which I cloned using git svn. git \nls-remote shows something like:\n\n...\nrefs/remotes/trunk\nrefs/remotes/2.0.2a\n...\n\nTo get the subversion branch names to appear as a local branch, I:\n\ngit remote add blah http://example.com/blah\ngit fetch blah +refs/remotes/*:refs/heads/*\n\nI have made changes now that are okay to be in master in my local \nrepository and I want to push them to the remote repository. The current \nbranch is master.\n\ngit push\n\ncomplains that push.default is not set. Now, I am confused by the \ndocumentation.\n\npush.default settings refer to either \"the upstream branch\" or a branch \nwith \"the same name\".\n\nWhat is \"the same name\"? Are these the same name:\n\nmaster\nrefs/remotes/origin/master\n\nalso, after the fetch above, are these the same name:\n\nrefs/heads/something\nrefs/remotes/something\n\nRegarding the upstream branch, I have in .git/config\n\n[remote \"origin\"]\nurl = http://example.com/blah\nfetch = +refs/heads/*:refs/remotes/origin/*\n\n[branch \"master\"]\nremote = origin\nmerge = refs/heads/master\n\ngit config -l shows\n\nbranch.master.remote=origin\nbranch.master.merge=refs/heads/master\n\nWhen in branch master, is the upstream branch refs/heads/master?\n\nThen, I think I can get push to push to refs/remotes/origin/master by \nsetting push.default to upstream, is that right?\n\nIn case \"master\" is not the same name as \"refs/remotes/origin/master\", \ncan you give me an example of branches with the same name that push \nwould push to when push.default is set to simple?\n\nKendall\n"},{"id":"219315","messageId":"51AD2502.4010804@kendallshaw.com","threadId":"34019","inReplyTo":"51AD1245.9050202@kendallshaw.com","subject":"Re: Setting of push.default or confusion about refspecs","fromName":"Kendall Shaw","fromEmail":"kshaw@kendallshaw.com","sentAt":"2013-06-03T23:21:38Z","receivedAt":"2013-06-03T23:21:38Z","isPatch":false,"sender":{"key":"kshaw@kendallshaw.com","avatar":null},"body":"On 06/03/2013 03:01 PM, Kendall Shaw wrote:\n> ... Regarding the upstream branch, I have in .git/config\n>\n> [remote \"origin\"]\n> url = http://example.com/blah\n> fetch = +refs/heads/*:refs/remotes/origin/*\n>\n> [branch \"master\"]\n> remote = origin\n> merge = refs/heads/master\n>\n> git config -l shows\n>\n> branch.master.remote=origin\n> branch.master.merge=refs/heads/master\n>\n> When in branch master, is the upstream branch refs/heads/master?\n>\n> Then, I think I can get push to push to refs/remotes/origin/master by \n> setting push.default to upstream, is that right?\n\nI bit the wax tadpole and tried it. I think setting push.default set to \nupstream does what I thought.\n\nKendall\n"}]}