I had already pushed some changes to a remote. Now I need to push some other changes which should be in that previously pushed commit but somehow are not. I can do this simply by pushing the changes with a new commit but just now I have found the --no-edit flag and --amend
If I need to push the new changes but I need a single commit having the old and new changes is git commit --amend --no-edit going to achieve that?
Yes, the git commit --amend --no-edit is the thing that I am looking for.
git add . (Add the added and modified files)git commit --amend --no-editgit push --force-with-lease <remote> <branch>If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With