Skip to content

Commit 3a39252

Browse files
authored
Merge pull request #102 from munendrasn/master
tips to add remote name and force push
2 parents 8d53a49 + 3839cd9 commit 3a39252

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ 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)
127+
* [Adding Remote name](#adding-remote-name)
126128

127129
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
128130
<!-- @doxie.inject end toc -->
@@ -852,5 +854,15 @@ git log master..<branch-name> --oneline | tail -1
852854
git reset HEAD <file-name>
853855
```
854856

857+
## Force push to Remote Repository
858+
```sh
859+
git push -f <remote-name> <branch-name>
860+
```
861+
862+
## Adding Remote name
863+
```sh
864+
git remote add origin <remote-url>
865+
```
866+
855867
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
856868
<!-- @doxie.inject end -->

tips.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,4 +373,10 @@
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>"
379+
}, {
380+
"title": "Adding Remote name",
381+
"tip": "git remote add origin <remote-url>"
376382
}]

0 commit comments

Comments
 (0)