Skip to content

Instantly share code, notes, and snippets.

@pford68
Created August 3, 2023 03:01
Show Gist options
  • Select an option

  • Save pford68/152b5040e2d65d5bdbc4539f644293d6 to your computer and use it in GitHub Desktop.

Select an option

Save pford68/152b5040e2d65d5bdbc4539f644293d6 to your computer and use it in GitHub Desktop.
Add changes to your last commit #git

We have all been in a situation where we have forgotten one little change, for which we have to make a new commit. When this change is not so huge, we can add it into our last commit using the -—amend flag.

git add .
git commit --amend --no-edit

Using the —-no-edit flag allows us to apply changes to our last commit without modifying the commit message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment