tip to amend last commit

This commit is contained in:
Pratyush 2015-08-22 19:20:06 +05:30
parent 5c85e36770
commit 97ea96885a
2 changed files with 10 additions and 0 deletions

View File

@ -52,6 +52,7 @@
* [Rename a branch](https://github.com/git-tips/tips#rename-a-branch)
* [rebases 'feature' to 'master' and merges it in to master ](https://github.com/git-tips/tips#rebases-feature-to-master-and-merges-it-in-to-master)
* [Archive the `master` branch](https://github.com/git-tips/tips#archive-the-master-branch)
* [Modify previous commit without modifying the commit message](https://github.com/git-tips/tips#modify-previous-commit-without-modifying-the-commit-message)
<!-- Dont remove or change the comment below that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
<!-- @doxie.inject end toc -->
@ -365,5 +366,10 @@ git checkout feature && git rebase @{-1} && git checkout @{-2} && git merge @{-1
git archive master --format=zip --output=master.zip
```
## Modify previous commit without modifying the commit message
```sh
git add --all && git commit --amend --no-edit
```
<!-- Dont remove or change the comment below that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
<!-- @doxie.inject end -->

View File

@ -204,5 +204,9 @@
{
"title": "Archive the `master` branch",
"tip": "git archive master --format=zip --output=master.zip"
},
{
"title": "Modify previous commit without modifying the commit message",
"tip": "git add --all && git commit --amend --no-edit"
}
]