I’ve met a trouble when I tried to rename folder Draft
to draft
, commands were as below
(Environment is Mac OS)
cd path/to/Draft
cd ..
git checkout main
git config core.ignorecase false
# git mv Draft draft # Failed with 'Invalid argument'
git mv Draft tmp && git mv tmp draft
git add -u draft
git commit -m "[fix] case in folder Draft"
which finally shows
6 files changed, 0 insertions(+), 0 deletions(-)
rename app/api/{Draft => draft}/change-draft.ts (100%)
rename app/api/{Draft => draft}/create-project-draft.ts (100%)
rename app/api/{Draft => draft}/create-user-draft.ts (100%)
rename app/api/{Draft => draft}/get-draft.ts (100%)
rename app/api/{Draft => draft}/get-project-drafts.ts (100%)
rename app/api/{Draft => draft}/get-user-drafts.ts (100%)
But as I run git log --follow draft
, it just shows the case fix commit.
While git log --follow Draft
shows all commits.
The scene is same in repo in github, which only shows 1 commit by me (6 rename operation are well shown, but other commits are lost)
Only the Blame can help me track the draft
history (It seems no effects for Blame)
So, can I rename Draft
to draft
with complete commit history in draft
? How or why can’t?
After Commit
commit
Commit Detail
concrete commit
Xili Yang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.