首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

change the author of a commit in git

2013-03-21 
change the author of a commit in git?git filter-branch --index-filter \find -name *.mp3 -or -n

change the author of a commit in git?

git filter-branch --index-filter \         'find -name ''*.mp3'' -or -name ''*.ogg'' | xargs -d''\n'' rm -f'#Suppose you want to remove a file (containing confidential information or copyright violation) from all commits:git filter-branch --tree-filter 'rm filename' HEAD



git filter-branch --commit-filter '        if [ "$GIT_COMMITTER_NAME" = "<Old Name>" ];        then                GIT_COMMITTER_NAME="<New Name>";                GIT_AUTHOR_NAME="<New Name>";                GIT_COMMITTER_EMAIL="<New Email>";                GIT_AUTHOR_EMAIL="<New Email>";                git commit-tree "$@";        else                git commit-tree "$@";        fi' HEAD



git filter-branch -f --env-filter "GIT_AUTHOR_NAME='Newname'; GIT_AUTHOR_EMAIL='newemail'; GIT_COMMITTER_NAME='Newname'; GIT_COMMITTER_EMAIL='newemail';" HEADgit filter-branch -f --env-filter "    GIT_AUTHOR_NAME='Newname'    GIT_AUTHOR_EMAIL='newemail'    GIT_COMMITTER_NAME='Newname'    GIT_COMMITTER_EMAIL='newemail'  " HEAD

热点排行