Changing a remote's URL

This commit is contained in:
Hemanth.HM 2015-07-16 09:07:15 +05:30
parent 979fe1c80d
commit 04573ea87d
2 changed files with 21 additions and 5 deletions

View File

@ -14,6 +14,8 @@
* [Track upstream branch](https://github.com/git-tips/tips#Track-upstream-branch)
* [Delete local branch](https://github.com/git-tips/tips#Delete-local-branch)
* [Delete remote branch](https://github.com/git-tips/tips#Delete-remote-branch)
* [Undo local changes with the last content in head](https://github.com/git-tips/tips#Undo-local-changes-with-the-last-content-in-head)
* [Changing a remote's URL](https://github.com/git-tips/tips#Changing-a-remotes-URL)
<!-- Dont remove or change the comment below that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
<!-- @doxie.inject end toc -->
@ -68,12 +70,22 @@ git branch -u origin/mybranch
## Delete local branch
```sh
git branch -d local_branchname
git branch -d <local_branchname>
```
## Delete remote branch
```sh
git push origin :remote_branchname
git push origin :<remote_branchname>
```
## Undo local changes with the last content in head
```sh
git checkout -- <file_name>
```
## Changing a remote's URL
```sh
git remote set-url origin <URL>
```
<!-- Dont remove or change the comment below that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->

View File

@ -37,14 +37,18 @@
},
{
"title": "Delete local branch",
"tip": "git branch -d local_branchname"
"tip": "git branch -d <local_branchname>"
},
{
"title": "Delete remote branch",
"tip": "git push origin :remote_branchname"
"tip": "git push origin :<remote_branchname>"
},
{
"title": "Undo local changes with the last content in head",
"tip": "git checkout -- file_name"
"tip": "git checkout -- <file_name>"
},
{
"title": "Changing a remote's URL",
"tip": "git remote set-url origin <URL>"
}
]