on GIT, pushing merges with merges
I have 3 branches: A, B, C
Usualy when i am to update my Origin I go to Master, merge the branch I've finished, and push.
Now, I had branch A, work, done. Went to branch B, merged A, work, done. Went to branch C, merged B, work, done.
If i go to master and merge C and push to ori开发者_如何学JAVAgin, can I delete already A, B and C ?
yes, once you merged c to Master, you can delete a,b,c as final code will be on Master. However, it doesn't cost you to keep these branches, if you would decide to roll back to some point.
Well, it sounds like you can. If you want to be sure, you can delete the branch with the -d
(small "d") option:
$ git branch -d $BRANCH
If all the commits in $BRANCH
haven't been merged into master
, you'll get an error that you can't delete the branch unless you use the -D
(big "D") option.
精彩评论