1
0
mirror of https://github.com/k88hudson/git-flight-rules.git synced 2025-03-10 20:58:39 -03:00

Merge branch 'patch-2' of https://github.com/stuartpb/git-flight-rules into stuartpb-patch-2

This commit is contained in:
Richard Littauer 2015-05-15 13:14:04 +07:00
commit 5a0f04c8e9

View File

@ -87,6 +87,15 @@ Note that, as with rebasing (see below), amending **replaces the old commit with
In general, **avoid force pushing**. It is best to create and push a new commit rather than force-pushing the amended commit as it has will cause conflicts in the source history for any other developer who has interacted with the branch in question or any child branches. In general, **avoid force pushing**. It is best to create and push a new commit rather than force-pushing the amended commit as it has will cause conflicts in the source history for any other developer who has interacted with the branch in question or any child branches.
<a name="undo-commit"></a>
## I need to undo my last commit
To reset Git to the state it was in before you made your last commit (while keeping your staged changes):
```
(my-branch*)$ git reset --soft HEAD@{1}
```
<a name="interactive-rebase"></a> <a name="interactive-rebase"></a>
## I need to combine commits ## I need to combine commits