KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
git mv file1 file2 git status # On branch master # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # renamed: file1 -> file2 git stash git stash pop # On branch master # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # new file: file2 # # Changes not staged for commit: # (use "git add/rm <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # deleted: file1 As you can see, git loses the renamed relationship after a stash / pop. Is there any way to regain this relationship, or have stash know that files were moved? I often stash to see what my system state is like pre-changes, but having it lose the rename relationship is a problem for me. I don't know how to fix it other than deleting the new file, doing a git mv again, and replacing the new file's contents.
Tags (comma-separated)
Save Edits
Cancel