Merge pull request #102 from munendrasn/master

tips to add remote name and force push
This commit is contained in:
hemanth.hm 2016-06-27 12:36:21 +05:30 committed by GitHub
commit 3a392529fe
2 changed files with 18 additions and 0 deletions

View File

@ -123,6 +123,8 @@ 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)
* [Get first commit in a branch (from master)](#get-first-commit-in-a-branch-from-master)
* [Unstaging Staged file](#unstaging-staged-file)
* [Force push to Remote Repository](#force-push-to-remote-repository)
* [Adding Remote name](#adding-remote-name)
<!-- Dont remove or change the comment below that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
<!-- @doxie.inject end toc -->
@ -852,5 +854,15 @@ git log master..<branch-name> --oneline | tail -1
git reset HEAD <file-name>
```
## Force push to Remote Repository
```sh
git push -f <remote-name> <branch-name>
```
## Adding Remote name
```sh
git remote add origin <remote-url>
```
<!-- Dont remove or change the comment below that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
<!-- @doxie.inject end -->

View File

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