-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstash-pop
16 lines (8 loc) · 1.14 KB
/
stash-pop
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
1)Suppose you have uncommited changes, then you can't do any of the operations from rebase interactive.
2)Alternative is, you can stash these changes into a stash area. Then do all ur rebase operations and then give pop
3)Use git stash when you want to record the current state of the working directory and the index, but want to go back to a clean working directory. The command saves your local modifications away and reverts the working directory to match the HEAD commit.
4)The modifications stashed away by this command can be listed with git stash list.
5)Calling git stash without any arguments is equivalent to git stash push.
6)The latest stash you created is stored in refs/stash; older stashes are found in the reflog of this reference and can be named using the usual reflog syntax (e.g. stash@{0} is the most recently created stash, stash@{1} is the one before it, stash@{2.hours.ago} is also possible). Stashes may also be referenced by specifying just the stash index (e.g. the integer n is equivalent to stash@{n}).
7)git stash pop throws away the (topmost, by default) stash after applying it.
Git stash pop stash@{0} => to get back ur changes