From 04573ea87de98d5f495de4ada9510d2a3bb65512 Mon Sep 17 00:00:00 2001 From: "Hemanth.HM" Date: Thu, 16 Jul 2015 09:07:15 +0530 Subject: [PATCH] Changing a remote's URL --- README.md | 16 ++++++++++++++-- tips.json | 10 +++++++--- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index b56b16d..b76911f 100644 --- a/README.md +++ b/README.md @@ -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) @@ -68,12 +70,22 @@ git branch -u origin/mybranch ## Delete local branch ```sh -git branch -d local_branchname +git branch -d ``` ## Delete remote branch ```sh -git push origin :remote_branchname +git push origin : +``` + +## Undo local changes with the last content in head +```sh +git checkout -- +``` + +## Changing a remote's URL +```sh +git remote set-url origin ``` diff --git a/tips.json b/tips.json index 519396e..8f9d55b 100644 --- a/tips.json +++ b/tips.json @@ -37,14 +37,18 @@ }, { "title": "Delete local branch", - "tip": "git branch -d local_branchname" + "tip": "git branch -d " }, { "title": "Delete remote branch", - "tip": "git push origin :remote_branchname" + "tip": "git push origin :" }, { "title": "Undo local changes with the last content in head", - "tip": "git checkout -- file_name" + "tip": "git checkout -- " + }, + { + "title": "Changing a remote's URL", + "tip": "git remote set-url origin " } ]