DEV Community

hmble
hmble

Posted on • Originally published at hmble.dev on

How to add changes to previous git commit ?

Unsplash image
Photo by Rod Long

Sooo aapne koi changes commit kiye aur ab aapko us commit me aur changes add karne hai, well lets use magic of git.

$ git commit --amend --no-edit
Enter fullscreen mode Exit fullscreen mode

Explanation

This command adds staged changes to previous commit without editing commit message.

NOTE :
Previous commit me changes amend karne se us commit ka <sha> change hota hai.


I know this is a short blog but I am trying to keep myself consistent to write a blog each day. I'll be glad if mai aapki help kar paaya to.

Feel free to say hi @hmbledev

Top comments (0)

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay