git-stash

Recover dropped stash in git

I frequently use "git stash" and "git stash pop" to save and restore changes in my working tree. Yesterday I had some changes in my working tree that I had stashed and popped, and then I made more changes to my working tree. I'd like to go back and review yesterday's stashed changes, but "git stash pop" appears to remove all references t...

Why isn't the git stash unique per branch?

I suppose it allows for moving changes from one branch to the next but that's what cherry picking is for and if you're not making a commit of your changes, perhaps you shouldn't be moving them around? I have on occasion applied the wrong stash at the wrong branch, which left me wondering about this question. ...

How to make git merge handle uncommitted changes to my working tree?

A co-worker and I are both working on the master branch at the moment. I have some code in my working tree that I don't want to commit (debugging statements and the like). Now if he commits changes to some of those same files, I can't merge them: $ git merge origin/master Updating 1b8c5c6..eb44c23 error: Entry 'blah.java' not uptodate...

git: How do you stash an untracked file?

I have changes to a file, plus a new file, and would like to use git stash to put them away while I switch to another task. But git stash by itself stashes only the changes to the existing file; the new file remains in my working tree, cluttering up my future work. How do I stash this untracked file? ...

How would I extract a single file (or changes to a file) from a git stash?

I'd like to know if it is possible to extract a single file or diff of a file from a git stash without popping the stash changeset off. Might anyone be able to provide some suggestions/ideas about this? ...

Is it possible to push a git stash to a remote repository?

In git, is it possible to create a stash, push the stash to a remote repository, retrieve the stash on another computer, and apply the stash? Or are my options: Create a patch and copy the patch to the other computer, or Create a minor branch and commit the incomplete work to that branch? ...

Undoing a git pull --rebase

Hey I'm new to git and I need to undo a pull, can anyone help?!? So what I've done is... git commit git stash git pull --rebase git stash pop this created a bunch of conflicts and went a bit wrong. Now doing 'git stash list' reveals that my stash is still there. Is it possible to revert my repo back to the point just after doing git ...

Can I fetch a stash from a remote repo into a local branch?

A colleague has a stash in their repository which I can access (via the filesystem), and I'd like to pull that stash into a branch in my repository. % git ls-remote ~alice/work/repo/ stash 3ccc82fb1ee0e7bde1250c7926d333ce21c109c0 refs/stash But when I try to fetch that, git tells me "unable to find 3cc82..." % git fetch ~ali...

Maintain set of local commits working with git-svn

I am using git to develop against a project hosted in subversion, using git-svn: git svn clone svn://project/ My general workflow has been to repeatedly edit-and-commit on the master branch, then commit to the svn repository via: git stash git svn dcommit git stash apply One of the local modifications that 'stash' command is preser...

Git - switching between branches in the middle of work

For various reasons (code review mostly) I need to switch from current development branch to other branches quite often. Currently, I use either 'git stash' to shelve the uncommitted changes, checkout other branch, then switch back and do 'git stash apply' However, sometimes I'd have some newly added files there, which are not tracked....

git stash blunder: git stash pop and ended up with merge conflicts

I did a git stash pop and ended up with merge conflicts. I removed the files from the file system and did a git checkout as shown below, but it thinks the files are still unmerged. I then tried replacing the files and doing a git checkout again and same result. I event tried forcing it with -f flag. Any help would be appreciated! chirag...

Is it possible to drop a single file from git stash?

Is it possible, without pop whole stash and save another without this particular file? ...

Is it possible to choose a git stash when they're described by the date stashed?

I'm able to list git stashes by date with git stash list --date=local but how do I select a revision without getting fatal: Needed a single revision ...

git: Can I stash an untracked file without adding it to the index?

A related question How do you stash an untracked file? was answered with "track the file." This doesn't work for my particular needs, however. I'm trying to stash everything that isn't in the index with git stash save --keep-index so that I can validate the index in my pre-commit hook. The idea is from the "Testing partial commits" exa...

git stash questions

Hello! I am running msysgit 1.7.3.1. If I run stash apply, and there is a conflict, all of my stash changes get staged. Is this the correct behaviour? I found it a little surprising. Another question: if I have stashed 10 files, and there is a conflict in one of them, will stash apply abort when it has a conflict, or will it apply all...

git stash apply does not restore all the files

Ok, so i have run into this a few times and it's really annoying. Scenario: modify a file say a.txt (add say two lines) stash it stash apply git reset remove the two lines added to a.txt because you want to commit and push these partial changes git add a.txt git commit the above, and push the changes (push irrelevant for this discussi...

git stash and edited hunks

I totally love git add -p and git stash but I occasionally have the following problem, which is reproduced by the following sequence of commands: git add -p my_file: then I edit a hunk manually (using e) because the splitting that git suggests does not suit me git stash --keep-index: then I do some testing, and if the tests pass I do n...