Skip to content

Commit

Permalink
doc: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
royeo committed Feb 13, 2019
1 parent c9a35dc commit 6cea387
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@
[![CircleCI](https://circleci.com/gh/royeo/git-checkout-branch.svg?style=shield)](https://circleci.com/gh/royeo/git-checkout-branch)
[![Go Report Card](https://goreportcard.com/badge/royeo/git-checkout-branch)](https://goreportcard.com/report/royeo/git-checkout-branch)

Switch git branches interactively.

The `git checkout-branch` command is a custom git command to improve the efficiency of switching branches.

## Features

- switch git branch interactively
- search git branch dynamically

## Overview

![](https://raw.githubusercontent.com/royeo/static/master/gif/git-checkout-branch.gif)
Expand Down Expand Up @@ -43,15 +46,16 @@ git config --global alias.cb checkout-branch
Use `git checkout-branch help` for help information.

```
Switch git branch interactively.
Checkout git branches more efficiently.
Usage:
git checkout-branch [flags]
Flags:
-r List the remote-tracking branches
-a List both remote-tracking branches and local branches
-n Set the number of branches displayed in the list, defaults to 10
-a, --all List both remote-tracking branches and local branches
-r, --remotes List the remote-tracking branches
-n, --number Set the number of branches displayed in the list (default 10)
--hide-help Hide the help information
```

## License
Expand Down
5 changes: 2 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ var rootCmd = &cobra.Command{
Short: "Checkout git branches more efficiently.",
Run: func(cmd *cobra.Command, args []string) {
if len(args) > 0 {
cmd.Usage()
cmd.Help()
os.Exit(1)
}

Expand Down Expand Up @@ -63,8 +63,7 @@ Flags:
-a, --all List both remote-tracking branches and local branches
-r, --remotes List the remote-tracking branches
-n, --number Set the number of branches displayed in the list (default 10)
--hide-help Hide the help information
-h, --help Help for git-checkout-branch`
--hide-help Hide the help information`
fmt.Println(usage)
os.Exit(1)
return nil
Expand Down

0 comments on commit 6cea387

Please sign in to comment.