In case you are sharing your repo with others this isn't great form as you will clog up the repo with all of your dodgy experimental branches. Alternatively, You may use git stash or maybe more completely git stash preserve "identify description" to avoid wasting your code inside a pseudo dedicate. This does not take care of untracked files.