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文件的主要内容,如果未能解决你的问题,请参考以下文章

git --删除文件重命名

text git实用程序用于移动/重命名文件或文件夹并使用它保留历史记录。

处理重命名:svn vs. git vs. mercurial

text 在GIT中重命名分支

text 在git中重命名本地和远程分支

text 在git中重命名本地和远程分支