Snowcrash
Snowcrash

Reputation: 86097

Does "git push --set-upstream origin name/of/my/branch" store intermediary branches?

If I do git push --set-upstream origin name/of/my/branch will that create any intermediary branches that may exist between itself and master?

e.g. say I branch off my master branch to create one called B1. I then branch off B1 to create B2. I repeat this from B2 to B3.

Now is there any information about B1 and B2 stored remotely (either via a physical branch or in the logs)?

Upvotes: 2

Views: 816

Answers (2)

Stephen Harris
Stephen Harris

Reputation: 11

You could us the shorthand flag "-u"

git push -u origin <branch>

or in this case:

git push -u origin B3

Upvotes: 0

bcmcfc
bcmcfc

Reputation: 26755

No, branches are fully independent of each other.

They are essentially just pointers to a commit.

git push --set-upstream origin B3 will push B3 and not B1 and B2 as well.

Upvotes: 3

Related Questions