-1

Please, take it easy on me guys, I don't really understand stashing w/git, I only understand git add, status and basic stuff about git, Hope you'd be really understanding with me about this

I stashed all my project files since that current changes is not yet finished so I did git stash and when I moved to another branch by git checkout ...

I commited my updated changes to the master branch and pushed it to its github repo but when I run my updated project with its local server, I found out that I don't have my updated project files. like all my updated contents were now gone, how do I get back to those.

enter image description here

TheBAST
  • 2,680
  • 10
  • 40
  • 68
  • What `git stash` does is commit your files into a commit that is not on any branch, and then do a `git reset --hard` to reset your index/staging-area and work-tree. When you use `git push`, you generally use branch names to select commits to send to the other Git. Since stash commits are on *no* branch, this never sends the stash commits. You'll need to un-stash the stash, and make a more-normal commit, and push that. – torek Nov 20 '19 at 07:26
  • Specifically all the files in : `git stash@{1}` – TheBAST Nov 20 '19 at 07:31
  • https://stackoverflow.com/search?q=%5Bgit-stash%5D+restore+files – phd Nov 20 '19 at 08:58
  • Does this answer your question? [How to recover stashed uncommitted changes](https://stackoverflow.com/questions/19003009/how-to-recover-stashed-uncommitted-changes) – Nils Werner Nov 20 '19 at 09:37
  • yep, instead of commiting the files I did stash them so how Do I recover those ? – TheBAST Nov 20 '19 at 12:40
  • Hey do you know of any ideas wherein I can see a birds-eye view of the files inside the project old and new. like all the files history of commits and changes and stashes.. – TheBAST Nov 21 '19 at 08:59

1 Answers1

0

You can get back your stash changes by writing "git stash pop" or if you want to keep changes in stash stack also then you can write "git stash apply".