I recently replaced the author, committer and emails thereof in all of my local commits, using the following command:
git filter-branch -f --env-filter '
if [ "$GIT_COMMITTER_NAME" = "oldname" ];
then
GIT_COMMITTER_NAME="newname";
GIT_COMMITTER_EMAIL="newaddr";
GIT_AUTHOR_NAME="newname";
GIT_AUTHOR_EMAIL="newaddr";
fi
if [ "$GIT_AUTHOR_NAME" = "oldname" ];
then
GIT_COMMITTER_NAME="newname";
GIT_COMMITTER_EMAIL="newaddr";
GIT_AUTHOR_NAME="newname";
GIT_AUTHOR_EMAIL="newaddr";
fi
' -- --all
The updates are immediately evident locally (e.g. in my SourceTree environment). However, after force-pushing the modified repository to GitHub…
git push -f origin master
… two individual items stubbornly refuse to have their committer and author updated: the Gemfile.lock file and a Views directory.
Please also note that:
This is the second time that I am performing this kind of operation on this repository. I believe that I faced no such issues the first time around.
Searching for my old name in the repository…
$ find . "<oldname">
… does yield a bunch of results, which means that the oldname still lurks in many of the repository files — including files that appear update both on GitHub and locally.
My question, then: How can I change the committer/author of the two "stubborn" files on GitHub?