git commit amend without changing message
$ git commit --amend -m "New and correct message"git commit --amend -m "New commit message"git commit --amend --no-edit$ (some_branch) git commit --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++:
- how to set up git user
- No module named SimpleHTTPServer
- linux create directory with permissions
- brew install memcached
- docker run npm install express syntax
- where is my ubuntu folder located
- source tree not installed
- problem with dependency and installation mariadb-server in ubuntu server 18.04LTS
- how to remove folder and its contents in linux
- virtual environments for python
- gitignore doesnt delte remote files
- linux command if directory exists
- how to install wtforms on mac terminal
- How to Install Julia on Ubuntu
- * Connection #0 to host artifactory-us.cytiva.net left intact
- git stash apply item
- how to upgrade node.js
- compare repositories github
- docker run ubuntu container
- upgrade docker compose windows
- how to set up python virtual environment
- convert vmdk to qcow2
- cmd network locaiton
- count number of files linux command