Skip to content

Commit a082bb7

Browse files
committed
Merge pull request git-tips#12 from anchal20/master
list remote reference and get list of branches
2 parents 6cfcc26 + 9cc9a46 commit a082bb7

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

README.md

+18
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
* [Delete remote branch](https://github.com/git-tips/tips#delete-remote-branch)
1717
* [Undo local changes with the last content in head](https://github.com/git-tips/tips#undo-local-changes-with-the-last-content-in-head)
1818
* [Changing a remote's URL](https://github.com/git-tips/tips#changing-a-remotes-url)
19+
* [Get list of all remote references](https://github.com/git-tips/tips#get-list-of-all-remote-references)
20+
* [Get list of all local and remote branches](https://github.com/git-tips/tips#get-list-of-all-local-and-remote-branches)
21+
* [Get only remote branches](https://github.com/git-tips/tips#get-only-remote-branches)
1922
* [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)
2023
* [Get git bash completion](https://github.com/git-tips/tips#get-git-bash-completion)
2124

@@ -90,6 +93,21 @@ git checkout -- <file_name>
9093
git remote set-url origin <URL>
9194
```
9295

96+
## Get list of all remote references
97+
```sh
98+
git remote
99+
```
100+
101+
## Get list of all local and remote branches
102+
```sh
103+
git branch -a
104+
```
105+
106+
## Get only remote branches
107+
```sh
108+
git branch -r
109+
```
110+
93111
## Stage parts of a changed file, instead of the entire file
94112
```sh
95113
git add -p

tips.json

+13
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,19 @@
5151
"title": "Changing a remote's URL",
5252
"tip": "git remote set-url origin <URL>"
5353
},
54+
{
55+
"title": "Get list of all remote references",
56+
"tip": "git remote",
57+
"alternatives": "git remote show"
58+
},
59+
{
60+
"title": "Get list of all local and remote branches",
61+
"tip": "git branch -a"
62+
},
63+
{
64+
"title": "Get only remote branches",
65+
"tip": "git branch -r"
66+
},
5467
{
5568
"title": "Stage parts of a changed file, instead of the entire file",
5669
"tip": "git add -p"

0 commit comments

Comments
 (0)