0

I am new to programming and new to github. I am currently doing my intern at a school department. I installed some js plugins today and realized I might have wiped out some of the other js files. Then I decided to just copy the .cshtml and .css files I have been working on and stash all other changes. I was stupid enough to forgot to make a copy of my .css file and all the changes are lost.

Is there anyway to reverse a "git stash" command?

Pevara
  • 14,242
  • 1
  • 34
  • 47
Patrick Mao
  • 1,013
  • 1
  • 8
  • 12

2 Answers2

3

Git's stash is essentially a stack of uncommitted changes. git stash (or more fully, git stash save) pushes your current set of uncommitted changes to the stack. The opposite would be to use git stash pop in order to return them to your working directory.

Mureinik
  • 297,002
  • 52
  • 306
  • 350
  • Sometimes you forget to pop your stashes. You can check how many stashes you have by typing > "git stash list" – Ola May 24 '16 at 20:23
3

while git stash pop works, you may also consider to use git stash apply. Check this question for more details

Community
  • 1
  • 1
pedrorijo91
  • 7,635
  • 9
  • 44
  • 82