git - Branch name clashes when pushing -
what think know
when clone or fetch remote repository, name of remote prefixed names of branches imported remote.
instance, if remote called origin
in repository, after cloning remote's master
branch called origin/master
in repository.
this behavior makes sure there never name clashes between imported branches branches exist in repository (whether created locally or imported other repositories).
what don't know (i.e. question)
when push remote repository, repository name prefixed (in remote repository) names of branches pushed?
if not, how branch name clashes avoided?
what think know
when clone or fetch remote repository, name of remote prefixed names of branches imported remote.
for instance, if remote called origin in repository, after cloning remote's master branch called
origin/master
in repository.
its not this.
when clone git repository git reference branches master checked out
every time checkout branch git add track branch it
when push remote repository, repository name prefixed (in remote repository) names of branches pushed?
whenever type push git use internal mechanism called refspec
the format of refspec optional
+
, followed<src>:<dst>
,<src>
pattern references on remote side ,<dst>
references written locally.
the + tells git update reference if isn’t fast-forward.
more reading:
https://www.atlassian.com/git/tutorials/refs-and-the-reflog#refspecs
Comments
Post a Comment