git reset everything to master but keep current changes code example Example: git reset keep changes git reset HEAD^ --soft