Removes a file from the last commit without changing its message.
git rm —-cached <file>
to remove the specified <file>
from the index.git commit —-amend
to update the contents of the last commit, without changing its message.git rm —-cached <file>
git commit —-amend
git rm —-cached "30-seconds.txt"
git commit —-amend
# Removes `30-seconds.txt` from the last commit
Git, Commit
Updates the last commit's message without changing its contents.
Git, Commit
Updates the last commit's contents without changing its message.
Git, Commit
Updates the last commit's author without changing its contents.