From 3dcab1f843fa67a7ba43f0a9693ce4e3a7c8737b Mon Sep 17 00:00:00 2001 From: Anchal Date: Thu, 16 Jul 2015 17:39:38 +0530 Subject: [PATCH 1/2] list remote reference and get list of branches --- tips.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tips.json b/tips.json index ebeaba9..c839a05 100644 --- a/tips.json +++ b/tips.json @@ -51,6 +51,18 @@ "title": "Changing a remote's URL", "tip": "git remote set-url origin " }, + { + "title": "Get list of all remote references", + "tip": "git remote || git remote show" + }, + { + "title": "Get list of all local and remote branches", + "tip": "git branch -a" + }, + { + "title": "Get only remote branches", + "tip": "git branch -r" + }, { "title": "Stage parts of a changed file, instead of the entire file", "tip": "git add -p" From 9cc9a46519d37fba34122b42471309c495540008 Mon Sep 17 00:00:00 2001 From: Anchal Date: Fri, 17 Jul 2015 12:27:32 +0530 Subject: [PATCH 2/2] tried with alternatives --- README.md | 18 ++++++++++++++++++ tips.json | 3 ++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 25b245a..ff2e852 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,9 @@ * [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) +* [Get list of all remote references](https://github.com/git-tips/tips#get-list-of-all-remote-references) +* [Get list of all local and remote branches](https://github.com/git-tips/tips#get-list-of-all-local-and-remote-branches) +* [Get only remote branches](https://github.com/git-tips/tips#get-only-remote-branches) * [Stage parts of a changed file, instead of the entire file](https://github.com/git-tips/tips#stage-parts-of-a-changed-file-instead-of-the-entire-file) * [Get git bash completion](https://github.com/git-tips/tips#get-git-bash-completion) @@ -90,6 +93,21 @@ git checkout -- git remote set-url origin ``` +## Get list of all remote references +```sh +git remote +``` + +## Get list of all local and remote branches +```sh +git branch -a +``` + +## Get only remote branches +```sh +git branch -r +``` + ## Stage parts of a changed file, instead of the entire file ```sh git add -p diff --git a/tips.json b/tips.json index 5214a0e..2d3200f 100644 --- a/tips.json +++ b/tips.json @@ -53,7 +53,8 @@ }, { "title": "Get list of all remote references", - "tip": "git remote || git remote show" + "tip": "git remote", + "alternatives": "git remote show" }, { "title": "Get list of all local and remote branches",