git reset amend
# Move the current head so that it's pointing at the old commit
# Leave the index intact for redoing the commit.
# HEAD@{1} gives you "the commit that HEAD pointed at before
# it was moved to where it currently points at". Note that this is
# different from HEAD~1, which gives you "the commit that is the
# parent node of the commit that HEAD is currently pointing to."
git reset --soft HEAD@{1}
# commit the current tree using the commit details of the previous
# HEAD commit. (Note that HEAD@{1} is pointing somewhere different from the
# previous command. It's now pointing at the erroneously amended commit.)
git commit -C HEAD@{1}
Also in C++:
- install dot-prop
- extract gz file ubuntu
- how to fix corrupted git file
- pyinstaller geeksforgeeks
- get the size of files in a directory linux
- cmder search histroy
- Treating warnings as errors because process.env.CI = true. github
- adonis make migration
- apt-get install certbot
- force https htaccess
- install en_web_core md
- bash sum floating point numbers
- kill process at a port ubuntu
- how to go to previous directory in terminal
- sed delete line with match
- history delete
- linux install make
- d3 install
- open current folder in terminal linux
- install tar.bz2 file
- download google drive file in linux
- escape tty linux keyboard
- The type initializer for 'SkiaSharp.SKImageInfo' threw an exception.
- convert shell script to yaml