Questions tagged [git-stash]

Allows to move pending changes in a working git directory away and restore them later, i.e. put them on a stash. You can have multiple stashes and it can also be used to move pending changes to another branch.

git stash allows you to stash changes in working directory, and then restoring them later, possibly on another branch.

Stashing changes is usually necessary when you need a clean working copy, e.g. before using or .

Popular questions

See also

References

$ git stash --help
675 questions
0
votes
1 answer

Showing stashes at the position of their parent commit

I'm using the following command to list all my commits: git log --oneline --graph --decorate --all This shows only one entry for my stashes. This entry is at the position of the the last commit from which I started a stash. Is it also possible to…
Edward
  • 4,453
  • 8
  • 44
  • 82
0
votes
1 answer

issue with stash applying

I am working on a rails application with another colleague. Whenever I pulled, I had encountered merge conflicts message. So each time I had seen that, I had used git stash and now I want to apply the changes inside those stashes, but I have…
Cror2014
  • 417
  • 1
  • 6
  • 16
0
votes
2 answers

How view recent changes to local repo in Git?

I'm working off of a big repo with lots of files. I've made minor changes in a lot of them (and haven't committed anything) and would like to be able to cycle through the history of changes to see exactly what was changed; similar to what happens if…
Mîchæl
  • 49
  • 2
  • 6
0
votes
1 answer

git stash, git apply, modifications, git commit, git pop (with rebase preferred)?

According to most of what I'm seeing temporary commits that you un-commit are the only way to rebase a stash. This seems like an awfully difficult and dangerous thing to try to test in my situation. do temporary commits go into the…
Maslow
  • 18,464
  • 20
  • 106
  • 193
0
votes
0 answers

Can't get rid of unwanted file change

First, my develop is clear, git status is clear. When I do pull origin develop followed by git status, it's shown below On branch develop Your branch is up-to-date with 'origin/develop'. Changes not staged for commit: (use "git add ..."…
wanghao
  • 3,335
  • 2
  • 18
  • 13
0
votes
2 answers

Manage git repository with multiple remote repos

I am working on a customization based on a github project https://github.com/USER_A/PROJ_A. I started by doing a clone of the original project and started my customization in a local branch MY_BRANCH. Once I am done, I wanted to push MY_BRANCH to…
JMC
  • 393
  • 1
  • 12
0
votes
1 answer

git stash apply conflict after rebasing and amending a commit

I stashed my changes to rebase and amend a commit. After rebasing, I deleted a file, staged it and the ran commit --amend Unfortunately the file in question had been modified when I stashed the work. Now after rebase --continue I can't stash apply…
MTVS
  • 2,046
  • 5
  • 26
  • 37
0
votes
0 answers

Git merge error I can not figure out

I am newish to Git and ran into an issue I do not understand and can not find in search. I am trying to stash two files that need to be deleted but I can not and I keep getting errors. Latest error…
user24793
  • 345
  • 5
  • 13
0
votes
0 answers

Git - how to do a local merge

I have stashed some changes java changes using git Stash save "mystash". I had some changes i saved to a word file from a month ago. The code has been updated by others many times since then. How did i get these stashed changes ? i cut and paste…
j2emanue
  • 60,549
  • 65
  • 286
  • 456
0
votes
1 answer

Weird behavior with running git stash twice

I had a few modified files in my develop branch and few that were newly created but untracked by git. I wanted to move these changes to a feature branch, So I ran git stash. After checking with git status, I realized that git did not stash the…
Setafire
  • 719
  • 2
  • 9
  • 21
0
votes
1 answer

Deleting Git stashes on a specific branch alone

git stash drop [] does not seem to have a branch option. Source: http://git-scm.com/docs/git-stash I guess it's a very obvious requirement to delete all stashes done on a specific branch, once that branch has been merged into master and is no…
Hari
  • 193
  • 1
  • 9
0
votes
1 answer

git status shows Index corrupted, after git stash

I already made my post here, but I still don't know is there any ways to recover back my .git/index & .git/HEAD I had corrupted .git/index & .git/HEAD, take a look at this image. Please, if you had experience this problem too, or any other solution…
mochadwi
  • 1,190
  • 9
  • 32
  • 87
0
votes
1 answer

Trying to reverse apply stash, git stash show and git apply giving errors

I'm following this git stashing guide but when I try to un-stash by using the command $ git stash show -p stash@{0} | git apply -R or $ git stash show -p | git apply -R I keep getting these errors error: patch failed:…
stcho
  • 1,909
  • 3
  • 28
  • 45
0
votes
1 answer

Is it possible to set TortoiseGit stash name from the command line?

Is there a way to specify a name for the stash when using the command line tool? TortoiseGitProc.exe /command:stashsave
sboulema
  • 837
  • 1
  • 10
  • 22
0
votes
0 answers

code pulled from git removed my updates in same file (local)

I have pulled my code from git. I know that some conflicts may happen. So I did the following commands for git pull. sudo git pull ...which did a fast-forward. Then I moved my local changes to buffer using sudo git stash Then I pulled new code…
user3755198
  • 105
  • 1
  • 3
  • 8