Skip to content

Commit

Permalink
Branches - list branches (k88hudson#171)
Browse files Browse the repository at this point in the history
  • Loading branch information
flexdinesh authored and RichardLitt committed Dec 16, 2017
1 parent d6d5c6f commit da6f0f8
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ For clarity's sake all examples in this document use a customized bash prompt in
- [I want to discard only my unstaged local changes](#i-want-to-discard-only-my-unstaged-local-changes)
- [I want to discard all of my untracked files](#i-want-to-discard-all-of-my-untracked-files)
- [Branches](#branches)
- [I want to list all branches](#i-want-to-list-all-branches)
- [Create a branch from a commit](#create-a-branch-from-a-commit)
- [I pulled from/into the wrong branch](#i-pulled-frominto-the-wrong-branch)
- [I want to discard local commits so my branch is the same as one on the server](#i-want-to-discard-local-commits-so-my-branch-is-the-same-as-one-on-the-server)
Expand Down Expand Up @@ -418,6 +419,27 @@ $ git clean -f
```

## Branches
<a name="i-want-to-list-all-branches"></a>
### I want to list all branches

List local branches

```sh
$ git branch
```

List remote branches

```sh
$ git branch -r
```

List all branches (both local and remote)

```sh
$ git branch -a
```

<a name="create-branch-from-commit"></a>
### Create a branch from a commit
```sh
Expand Down

0 comments on commit da6f0f8

Please sign in to comment.