Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

merging a branch

Marc O'Sullivan July 28, 2015

Hi there,

I've done some work on a branch and now want to put the work back in the master and discard the branch. how do I do that?

Many thanks,

Marc

2 answers

2 votes
Seth
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 28, 2015
0 votes
Johannes Kilian
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 28, 2015

Basically you checkout your destination branch (master) and do a git merge branchname....

 

About "discarding a branch":

Have a look at  Git Branching - What a Branch Is. Deleting a branch is simply removing the symbolic name of the branch - all the commits done on the branch are preserved (that's one of the main purposes of a VCS: preserving old commits). If you want to get rid of all commits on the branch and want to have only one single commit (containing all changes made on the branch), there are more advanced git command (you have to do a git merge --squash ....)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events