![]() git for-each-ref -format="%(refname)" refs/original/ | while read ref do git update-ref -d $ref doneĪlso the reflog might contain references to the path that we want to delete. ![]() git/refs/original. These refs must be deleted in order to remove references to these objects. The git filter-branch command will create backup refs in. If git filter-branch works you should see something like this in the output Rewrite 7ccdce1a692fe3a5b12da0eff15127a0abf5a849 (171/18232)rm '/**' git filter-branch -index-filter 'git rm -rf -cached -ignore-unmatch ' -prune-empty -tag-name-filter cat -all allĪlternatively one can filter all commits by just ommiting the commit id range. git filter-branch -index-filter 'git rm -rf -cached -ignore-unmatch ' -prune-empty -tag-name-filter cat - ^1. The option –index-filter is used to improve performance since the working directory is not checked out for each commit. Remove all paths from the repository and rewrite the commits.The command’s output will be something like this commit 2e746b23f09a006a3381292dc264ada4ba5e9ff8 can be a directory or a file path relative to the working directory root. The next command prints out the commit hash in which the path was removed. Find the Snapshot in which the path was removed.The first command prints out the commit hash in which the path was first introduced. ![]() Find the Snapshot which introduced some path.The steps described below only work with a non-bare repository.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |