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 ....)
Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG