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 ....)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.