Keep dash after git filter-branch --subdirectory-filter

I recently split my repository (while in bigproj ) using git filter-branch --subdirectory-filter deep/in/my/project . Then I moved the .git directory to deep/in/my/project .

Now, stash is in a weird state where the top cache looks something like this:

 stash@ {0}: filter-branch: rewrite 

I can not drop this cache because I get this error (after git stash drop ):

 refs/ stash@ {0}: not a valid stashed state 

Now, even if I know refid stash @ {1}, it still contains diff for the files in the bigproj hierarchy. Is it possible to overwrite bookmark data so that it only contains files that belong to the deep/in/my/project hierarchy?

+6
source share
2 answers

I had the same problem after using git filter-branch . The following command draws stash completely and therefore also deletes entries created with git filter-branch . Warning! that all hidden changes may not be able to be restored after calling this command, so be sure to apply all other hidden states before calling the command.

  git stash clear 
+3
source

I assume you should do drop and pop before moving the .git directory. You can always reinstall it after moving.

0
source

Source: https://habr.com/ru/post/894910/


All Articles