0

I have had a dirty state in my project, which I did not want to commit. I did a git stash, to save it for later. Afterwards I continued and did some commits. The project now is in detached HEAD mode.

Now, I do not care about the stashed changes anymore. How can be the current last commit be made to the new master?

Alexis King
  • 43,109
  • 15
  • 131
  • 205
andreas
  • 1,483
  • 1
  • 15
  • 36

1 Answers1

1

You can get rid of an unneeded stash with git stash drop [stash-id] (default is the latest stash, see all with git stash list).

You can go back to master by git checkout master, but note that this may discard changes in your working directory.

John Zwinck
  • 239,568
  • 38
  • 324
  • 436
  • thanks. deleted the stash, created a branch, merged back the changes into master and finally deleted the branch. everything clean again. – andreas Nov 25 '13 at 13:19