Merge pull request #12 from anchal20/master

list remote reference and get list of branches
This commit is contained in:
hemanth.hm 2015-07-17 12:37:07 +05:30
commit a082bb79d2
2 changed files with 31 additions and 0 deletions

View File

@ -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 -- <file_name>
git remote set-url origin <URL>
```
## 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

View File

@ -51,6 +51,19 @@
"title": "Changing a remote's URL",
"tip": "git remote set-url origin <URL>"
},
{
"title": "Get list of all remote references",
"tip": "git remote",
"alternatives": "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"