I am setting up a git repository which I cloned using git svn. git ls-remote shows something like:


To get the subversion branch names to appear as a local branch, I:

git remote add blah http://example.com/blah
git fetch blah +refs/remotes/*:refs/heads/*

I have made changes now that are okay to be in master in my local repository and I want to push them to the remote repository. The current branch is master.

git push

complains that push.default is not set. Now, I am confused by the documentation.

push.default settings refer to either "the upstream branch" or a branch with "the same name".

What is "the same name"? Are these the same name:


also, after the fetch above, are these the same name:


Regarding the upstream branch, I have in .git/config

[remote "origin"]
url = http://example.com/blah
fetch = +refs/heads/*:refs/remotes/origin/*

[branch "master"]
remote = origin
merge = refs/heads/master

git config -l shows


When in branch master, is the upstream branch refs/heads/master?

Then, I think I can get push to push to refs/remotes/origin/master by setting push.default to upstream, is that right?

In case "master" is not the same name as "refs/remotes/origin/master", can you give me an example of branches with the same name that push would push to when push.default is set to simple?


To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to