I\'ve done a fair bit of work (\"Your branch is ahead of \'origin/master\' by 37 commits.\") which really should have gone into its own branch rather than into master<
Here is a much simpler way:
Create a new branch
On your new branch do a git merge master- this will merge your committed (not pushed) changes to your new branch
Delete you local master branch git branch -D master Use -D instead of -d because you want to force delete the branch.
Just do a git fetch on your master branch and do a git pull on your master branch to ensure you have your teams latest code.