text 跟踪重命名git文件

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了text 跟踪重命名git文件相关的知识,希望对你有一定的参考价值。

for f in $(git diff --name-status --diff-filter='A' HEAD~ "*.kt" | cut -f 2);
do mv -- "$f" "${f%.kt}.java";
done
# Commit the kt to java changes
git add .
git commit -m"kt to java"
# Revert, but stash before committing
git revert --no-commit HEAD 
git stash 
# Squash the java change into the original commit
git reset --soft HEAD~ 
git commit --amend --no-edit 
# Pop the stashed revert changes and commit
git stash pop 
git commit -am"Rename $1 to Kotlin"

以上是关于text 跟踪重命名git文件的主要内容,如果未能解决你的问题,请参考以下文章