CopyPastor

Detecting plagiarism made easy.

Score: 1; Reported for: Exact paragraph match Open both answers

Possible Plagiarism

Plagiarized on 2019-10-09
by CodeWizard

Original Post

Original - Posted on 2009-05-15
by Rognon



            
Present in both answers; Present only in the new answer; Present only in the old answer;

You will need to use filter-branch
<!-- language: lang-bash -->
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 `


If you are the **ONLY** user who committed to this repository you can simply update all references without checking the old content
<!-- language: lang-bash -->
git filter-branch -f --env-filter ' GIT_AUTHOR_NAME="Newname" GIT_AUTHOR_EMAIL="newemail" GIT_COMMITTER_NAME="Newname" GIT_COMMITTER_EMAIL="newemail" ' HEAD
You can also do:
<!-- language: lang-bash -->
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
Note, if you are using this command in the Windows command prompt, then you need to use `"` instead of `'`:
<!-- language: lang-bash -->
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

        
Present in both answers; Present only in the new answer; Present only in the old answer;