Added points to note when using git force push (#25412)
git force push is very powerful but equally dangerous. Added a quick warning note for using git force push
This commit is contained in:
committed by
Manish Giri
parent
fcdf2af664
commit
8b99db9acf
@ -57,6 +57,12 @@ By default `git push` will trigger the `--verify` toggle. This means that git w
|
||||
git push --no-verify
|
||||
```
|
||||
|
||||
### Points to Note
|
||||
|
||||
`git push --force` should be used very carefully. This command basically overrides the remote repository with any code that you have in the local. In the meanwhile if anyone else had commited to the remote repository then their code will be completely overwritten.
|
||||
|
||||
In some cases it makes sense to use force push to get the job done. But always evaluate the risks before running a force push command.
|
||||
|
||||
|
||||
### More Information:
|
||||
- [Git documentation - push](https://git-scm.com/docs/git-push)
|
||||
|
Reference in New Issue
Block a user