문제

I'm trying to search on the web a way to rename all the files in a directory and move all the contents of that directory one level up inside another directory using git.

For example, replace "run" with ruin"

Directory a/b/c contains:
run1.txt
run2.txt
runner.txt
file.txt

Result: 
Directory a/d/ contains:
ruin1.txt
ruin2.txt
ruiner.txt
file.txt
도움이 되었습니까?

해결책

If you do move the files yourself (without git), then you would need a:

git add -A

That way, git will detect the changes. See "What's the difference between git add . and git add -u?": git will detect the additions and the deletions, and deduce from it the moves.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top