开发者

Case typo on path in msysgit

I went out to my github repo and discovered that I had inadvertently added files to msysgit with a typo. Instead of adding files to a directory c开发者_运维问答alled "Domain", I added them to "DOmain".

I tried git mv, but the path is case-insensitive in Windows and the move fails.

What's the best way to resolve an issue like this?


mv to something else, like "tempdir", and then mv back to the proper capitalization?


Go back in history (git checkout someHash), create new dir with proper case, checkout the files from the wrong commit (git checkout someWrongHash someFiles), commit them, and then, reset HEAD to the new commit.

(And next time, don't torture youreslf with git on Windows ;) )

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜