Answers for "github change actual commit"

5

git change commit

# for the most recent commit
git commit --amend -m "changed commits"
git push -f
# for n older commits
git rebase -i HEAD~n
# use r for reword to edit older commits
# removing a line means THAT COMMIT WILL BE LOST. 
git rebase --continue
# solve conflicts if exist
git push -f
# git push --force-with-lease origin <branch> is safer
Posted by: Guest on November-08-2021
1

github change commit date

git filter-branch --env-filter 
    'if [ $GIT_COMMIT = 119f9ecf58069b265ab22f1f97d2b648faf932e0 ]
     then
         export GIT_AUTHOR_DATE="Fri Jan 2 21:38:53 2009 -0800"
         export GIT_COMMITTER_DATE="Sat May 19 01:01:01 2007 -0700"
     fi'
Posted by: Guest on April-17-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language