restore - Restoring git directory while preserving history -
i know can restore removed directory follows
git checkout {revision} -- {dir}
however, history of files in restored directory gone. seen 'new' files.
is there way restore directory while still preserving files' history?
git tag originalhead # in case git rebase -i <id of parent of commit deleted file> # change pick edit commit git checkout <id of previous commit> <filename> git commit --amend git rebase --continue git tag -d originalhead
i found here
Comments
Post a Comment