I know there are similar questions but I am very much new to the whole 'git' scene. So I wanted to ask this question with my own contextual situation.
So I use git for work, where I use SmartGit to stage and commit files, gitbash to push/pull, and polygerrit to submit those commits into my work's repo.
My usual steps are:
- open smartgit and select files in working tree to be staged
- select all staged files and commit
- enter description and click commit (I don't push from SmartGit because it's caused problems before)
- go to PolyGerrit, +1 the commit myself, then submit
- open gitbash and change directory
- do "git push"
- do "git stash"
- do "git pull" then "git push"
- do "git stash pop"
- then, I'm usually all good to go.
I'm sure there's something unnecessary I'm doing, or an easier way, but after many a merge conflict and other issues, these exact steps have worked fine for a while now. But today I accidentally typed "git stash pop" before using "git stash". PolyGerrit doesn't show any mergeconflicts, but gitbash does? Is there any way at all to undo the "git stash pop"?
The files are either .png, .md, .ai, or .svg (if it helps at all?)
Any help is much appreciated. Thanks!
A general suggestion is to use
git stash applyinstead ofgit stash popas the former is more forgiving as it keeps the stashed diff in the stash-list whereas the latter removes it after applying.