From 8b99db9acf575cde60e5d77ec99b3254bdee3479 Mon Sep 17 00:00:00 2001 From: Aditya Sridhar Date: Thu, 20 Dec 2018 16:34:51 +0530 Subject: [PATCH] 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 --- guide/english/git/git-push/index.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/guide/english/git/git-push/index.md b/guide/english/git/git-push/index.md index 3da6346574..11f0f753a8 100644 --- a/guide/english/git/git-push/index.md +++ b/guide/english/git/git-push/index.md @@ -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)