mirror of
https://github.com/k88hudson/git-flight-rules.git
synced 2025-03-10 12:48:43 -03:00
Merged #7 with upstream
This commit is contained in:
commit
2a01c08c37
@ -21,8 +21,14 @@ For clarity's sake all examples in this document use customized bash prompt in o
|
||||
|
||||
```
|
||||
(my-branch*)$ git commit --amend
|
||||
|
||||
```
|
||||
|
||||
<a name="force-push"></a>
|
||||
### I tried to push my amended commit to a remote, but I got an error message
|
||||
|
||||
Note that, as with rebasing (see below), amending **replaces the old commit with a new one**, so you must force push (`-f`) your changes if you have already pushed the pre-amended commit to your remote. Be careful when you do this – *always* make sure you specify a branch!
|
||||
|
||||
<a name="interactive-rebase"></a>
|
||||
## I need to combine commits
|
||||
|
||||
@ -176,7 +182,7 @@ hint: 'git pull ...') before pushing again.
|
||||
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
|
||||
```
|
||||
|
||||
Since rebasing **replaces the old commit(s) with a new one**, you must force push (`-f`) your changes. Be careful when you do this - *always* make sure you specify a branch!
|
||||
Since rebasing **replaces the old commit(s) with a new one**, you must force push (`-f`) your changes. Be careful when you do this – *always* make sure you specify a branch!
|
||||
|
||||
```
|
||||
(mybranch) $ git push origin mybranch -f
|
||||
|
Loading…
x
Reference in New Issue
Block a user