Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Hilton Meyer
Hilton Meyer

Posted on • Originally published athiltonmeyer.com on

     

Git commit file to previous commit

I ran into an issue of wanting to simply add a small change to a previous commit that I had just done. I am trying to use git in a way that will hopefully enable me to work on larger projects in the future and being able to navigate the logs has been something that pops up more and more. So creating these mini commits for fixes that were typo's or something like that would definitely not create a clean history. A bit of searching and I found the solution:

git commit --amend --no-edit

This allows me to add the small fix to the previous commit and I don't even have to have another message. Of course I could omit the--no-edit and then add another message with-m [new message].

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

⚙️
  • Location
    Israel
  • Work
    DBA/Developer at Komit
  • Joined

More fromHilton Meyer

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp