mirror of
https://github.com/namibia/tips.git
synced 2024-11-05 21:07:53 +00:00
Merge pull request #102 from munendrasn/master
tips to add remote name and force push
This commit is contained in:
commit
3a392529fe
12
README.md
12
README.md
@ -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)
|
* [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)
|
||||||
|
* [Adding Remote name](#adding-remote-name)
|
||||||
|
|
||||||
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
|
<!-- Don’t 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 +854,15 @@ 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>
|
||||||
|
```
|
||||||
|
|
||||||
|
## Adding Remote name
|
||||||
|
```sh
|
||||||
|
git remote add origin <remote-url>
|
||||||
|
```
|
||||||
|
|
||||||
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
|
<!-- Don’t 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 -->
|
||||||
|
@ -373,4 +373,10 @@
|
|||||||
}, {
|
}, {
|
||||||
"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>"
|
||||||
|
}, {
|
||||||
|
"title": "Adding Remote name",
|
||||||
|
"tip": "git remote add origin <remote-url>"
|
||||||
}]
|
}]
|
||||||
|
Loading…
Reference in New Issue
Block a user