I've searched a bit, but can't seem to find the answer.
On two the boxes I have access to, when I do a "git push --dry-run origin mytestbranch", I get the following result:
To git@bitbucket.org:rien/test.git
* [new branch] test -> test
However, on my macbook, when I try the same command, I get the following result:
To git@bitbucket.org:rien/test.git
417248a..cf7d564 test -> master
Only when I explicitly say push to the test origin branch (git push --dry-run origin test:test
) does it work as expected.
How do I change it so that a basic git push --dry-run bb test
will push to a newly created remote branch and not to master?
I created the test branch on both boxes with a git checkout -b test origin/master
Edited to add:
- both branches have a git config push.default
set to tracking
.
I specifically want to know how to configure git so that when i type git push origin test
that it acts the same as git push origin test:test