Skip to content

Commit 623e818

Browse files
committed
Add tip to force push
1 parent 8d53a49 commit 623e818

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ P.S: All these commands are tested on `git version 2.7.4 (Apple Git-66)`.
123123
* [Search Commit log across all branches for given text](#search-commit-log-across-all-branches-for-given-text)
124124
* [Get first commit in a branch (from master)](#get-first-commit-in-a-branch-from-master)
125125
* [Unstaging Staged file](#unstaging-staged-file)
126+
* [Force push to Remote Repository](#force-push-to-remote-repository)
126127

127128
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
128129
<!-- @doxie.inject end toc -->
@@ -852,5 +853,10 @@ git log master..<branch-name> --oneline | tail -1
852853
git reset HEAD <file-name>
853854
```
854855

856+
## Force push to Remote Repository
857+
```sh
858+
git push -f <remote-name> <branch-name>
859+
```
860+
855861
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
856862
<!-- @doxie.inject end -->

tips.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,4 +373,7 @@
373373
}, {
374374
"title":"Unstaging Staged file",
375375
"tip": "git reset HEAD <file-name>"
376+
}, {
377+
"title": "Force push to Remote Repository",
378+
"tip": "git push -f <remote-name> <branch-name>"
376379
}]

0 commit comments

Comments
 (0)