1
0
mirror of https://github.com/namibia/tips.git synced 2024-12-23 02:28:58 +00:00

Add tip to force push

This commit is contained in:
S N Munendra 2016-06-25 11:16:58 +05:30
parent 8d53a4974d
commit 623e818a94
2 changed files with 9 additions and 0 deletions

View File

@ -123,6 +123,7 @@ P.S: All these commands are tested on `git version 2.7.4 (Apple Git-66)`.
* [Search Commit log across all branches for given text](#search-commit-log-across-all-branches-for-given-text) * [Search Commit log across all branches for given text](#search-commit-log-across-all-branches-for-given-text)
* [Get first commit in a branch (from master)](#get-first-commit-in-a-branch-from-master) * [Get first commit in a branch (from master)](#get-first-commit-in-a-branch-from-master)
* [Unstaging Staged file](#unstaging-staged-file) * [Unstaging Staged file](#unstaging-staged-file)
* [Force push to Remote Repository](#force-push-to-remote-repository)
<!-- Dont remove or change the comment below that can break automatic updates. More info at <http://npm.im/doxie.inject>. --> <!-- Dont remove or change the comment below that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
<!-- @doxie.inject end toc --> <!-- @doxie.inject end toc -->
@ -852,5 +853,10 @@ git log master..<branch-name> --oneline | tail -1
git reset HEAD <file-name> git reset HEAD <file-name>
``` ```
## Force push to Remote Repository
```sh
git push -f <remote-name> <branch-name>
```
<!-- Dont remove or change the comment below that can break automatic updates. More info at <http://npm.im/doxie.inject>. --> <!-- Dont remove or change the comment below that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
<!-- @doxie.inject end --> <!-- @doxie.inject end -->

View File

@ -373,4 +373,7 @@
}, { }, {
"title":"Unstaging Staged file", "title":"Unstaging Staged file",
"tip": "git reset HEAD <file-name>" "tip": "git reset HEAD <file-name>"
}, {
"title": "Force push to Remote Repository",
"tip": "git push -f <remote-name> <branch-name>"
}] }]