سؤال

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