I created a new branch named newbranch from the master branch in git. Now I have done some work and want to merge newbranch to m
To keep the branching clean, you could do this:
git checkout newbranch
git branch newbranch2
git reset --hard # the commit at which you want to merge
git checkout master
git merge newbranch
git checkout newbranch2
This way, newbranch will end where it was merged into master, and you continue working on newbranch2.