The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

merging a branch

Marc O'Sullivan
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
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

Comments for this post are closed

Community moderators have prevented the ability to post new 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 Champions.
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 Champions.
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 ....)

TAGS
AUG Leaders

Atlassian Community Events