I worked on my local feature branch, foo. Then I wanted to push that new branch to origin so others could work on it. The normal way to do this is:
git push origin foo:foo
Which I eventually did, and it worked completely as expected, pushing up 61 objects. Before doing that, on a whim, I tried:
git push origin
Thinking maybe it would default to making a new remote branch based on the name of my local branch. The output was normal push output, with only 13 objects pushed up. The results were imperceivable. Nothing new showed up for the other devs or in my local repo after a fetch.
So what does git think I'm telling it to do when I do git push origin
, and what effect, if any, did it have on my remote repo?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…