mirror of
https://github.com/k88hudson/git-flight-rules.git
synced 2025-03-10 12:48:43 -03:00
Added note about force pushing
This commit is contained in:
parent
69afe5e1ec
commit
0b1f8fe4b6
17
README.md
17
README.md
@ -160,6 +160,23 @@ If at any time you want to stop the entire rebase and go back to the original st
|
||||
(my-branch)$ git rebase --abort
|
||||
```
|
||||
|
||||
#### When I try to push, I get an error message:
|
||||
|
||||
```
|
||||
To https://github.com/yourusername/repo.git
|
||||
! [rejected] mybranch -> mybranch (non-fast-forward)
|
||||
error: failed to push some refs to 'https://github.com/tanay1337/webmaker.org.git'
|
||||
hint: Updates were rejected because the tip of your current branch is behind
|
||||
hint: its remote counterpart. Integrate the remote changes (e.g.
|
||||
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!
|
||||
|
||||
```
|
||||
(mybranch) $ git push origin mybranch -f
|
||||
```
|
||||
|
||||
## I committed to master instead of a new branch
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user