git commit -a -m "wrong commit, needs change" # both code and commit message can be amended
git add forgotten_file edited_file ... # stage the changes to fix previous commit
git commit --amend --no-edit # commit staged changes, without editing commit message
git commit --amend -m "revised commit message" # edit commit message, and commits staged changes if any
Last active
May 22, 2021 15:20
-
-
Save srikanthmanda/c74a85b457500063752e8332640aa103 to your computer and use it in GitHub Desktop.
Git Tips
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment