Skip to content

Instantly share code, notes, and snippets.

@leoj3n
Created January 15, 2014 11:10
Show Gist options
  • Save leoj3n/8434445 to your computer and use it in GitHub Desktop.
Save leoj3n/8434445 to your computer and use it in GitHub Desktop.
Using gush on the command-line.

Learning gush!

Create an issue

There needs to be an open issue before a PR can be made. This makes sense because you should always discuss the work you're about to do with team members before you go off and do it. It also gives someone else a chance to "take" the issue and create a PR for it if you're too busy, forget, or w/e.

I created this issue: https://github.com/cordoval/gush/issues/114

Take the issue, fix, and then create a PR

###############################################################################

"List" open issues.

###############################################################################

~/gush git:master ❯❯❯ gsh issue:list
+-----+-------+-----+------------------------------------------+-----------+-----------+-----------------+-------------------+------------+
| #   | State | PR? | Title                                    | User      | Assignee  | Milestone       | Labels            | Created    |
+-----+-------+-----+------------------------------------------+-----------+-----------+-----------------+-------------------+------------+
| 114 | open  |     | Documentation: "Send PR" bash syntax ... | leoj3n    |           |                 |                   | 2014-01-15 |
| 95  | open  |     | logo within days or hours!               | cordoval  |           |                 |                   | 2014-01-09 |
| 92  | open  |     | write documentation how to work with ... | cordoval  |           |                 |                   | 2014-01-09 |
| 90  | open  |     | mock Process and usage of Custom Proc... | cordoval  |           |                 |                   | 2014-01-09 |
| 88  | open  |     | installer line                           | cordoval  |           |                 |                   | 2014-01-09 |
| 85  | open  |     | implement types of merges                | cordoval  |           |                 |                   | 2014-01-08 |
| 77  | open  |     | Create a pull request and convert an ... | dantleech |           |                 |                   | 2014-01-08 |
| 76  | open  |     | Convert all repo and org arguments to... | dantleech |           |                 | hasPR             | 2014-01-08 |
| 68  | open  |     | create library of `paddings on the back` | cordoval  |           |                 |                   | 2014-01-07 |
| 66  | open  |     | Issues Reports                           | dantleech |           |                 |                   | 2014-01-07 |
| 61  | open  | PR  | [POC] Turn org and repo arguments int... | dantleech | dantleech | Basic Featur... |                   | 2014-01-06 |
| 48  | open  |     | Support for 2fa = two factor authenti... | cordoval  |           |                 |                   | 2014-01-03 |
| 46  | open  |     | add fork command and include check on... | cordoval  |           |                 |                   | 2014-01-03 |
| 44  | open  | PR  | [WIP] implement change of pull reques... | cordoval  |           |                 |                   | 2014-01-03 |
| 27  | open  |     | keep in mind github-gem                  | cordoval  |           |                 |                   | 2014-01-02 |
| 25  | open  |     | integrate with RMT                       | cordoval  |           | Basic Featur... | enhancement       | 2014-01-02 |
| 21  | open  |     | github page improvement and polishing... | cordoval  |           | Basic Featur... | enhancement       | 2014-01-01 |
| 20  | open  |     | mt switch 2.4 & mt rebase 2.3            | cordoval  |           | Basic Featur... | enhancement       | 2013-12-31 |
| 17  | open  |     | Add '--dry-run' parameter                | aik099    |           |                 | enhancement       | 2013-12-31 |
| 14  | open  |     | Tests and Documentation for Commands     | cordoval  |           | Basic Featur... | enhancement       | 2013-12-30 |
| 4   | open  |     | change the base branch of a Pull Request | cordoval  |           | Basic Featur... | enhancement,hasPR | 2013-12-26 |
+-----+-------+-----+------------------------------------------+-----------+-----------+-----------------+-------------------+------------+

21 issues

###############################################################################

"Take" an issue.

###############################################################################

~/gush git:master ❯❯❯ gsh p:take 114
OUT > Fetching origin
OUT > Fetching leoj3n
ERR > Note: checking out 'origin/master'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b new_branch_name

HEAD is now at 35a77c3... plug information about mailing list and irc channel
ERR > Switched to a new branch '114-documentation-send-pr-bash-syntax-highlighting-is-confusing'

###############################################################################

Make my edits to README.md

###############################################################################

~/gush git:114-documentation-send-pr-bash-syntax-highlighting-is-confusing ❯❯❯ e README.md

###############################################################################

"gws" or git (working directory) status

###############################################################################

~/gush git:114-documentation-send-pr-bash-syntax-highlighting-is-confusing ❯❯❯ gws
 M README.md

###############################################################################

"gcam" or git commit -am

###############################################################################

~/gush git:114-documentation-send-pr-bash-syntax-highlighting-is-confusing ❯❯❯ gcam 'Remove bash syntax highlighting'
[114-documentation-send-pr-bash-syntax-highlighting-is-confusing a341b92] Remove bash syntax highlighting
 1 file changed, 1 insertion(+), 1 deletion(-)

###############################################################################

"Create" a pull request with my changes!

###############################################################################

~/gush git:114-documentation-send-pr-bash-syntax-highlighting-is-confusing ❯❯❯ gsh p:create
Bug fix? [y] n
New feature? [n]
BC breaks? [n]
Deprecations? [n]
Tests pass? [y]
Fixed tickets [#000] #114
License [MIT]
Doc PR
PR Title: Removed bash syntax highlighting from README.md
ERR > fatal: remote leoj3n already exists.
OUT > Fetching origin
OUT > Fetching leoj3n
ERR > To [email protected]:leoj3n/gush.git
 * [new branch]      114-documentation-send-pr-bash-syntax-highlighting-is-confusing -> 114-documentation-send-pr-bash-syntax-highlighting-is-confusing
OUT > Branch 114-documentation-send-pr-bash-syntax-highlighting-is-confusing set up to track remote branch 114-documentation-send-pr-bash-syntax-highlighting-is-confusing from leoj3n.
https://github.com/cordoval/gush/pull/115
~/gush git:114-documentation-send-pr-bash-syntax-highlighting-is-confusing ❯❯❯ gco master
Switched to branch 'master'
Your branch is up-to-date with 'origin/master'.

The final result!

This was the result of that minimal mount of effort/commands:

https://github.com/cordoval/gush/pull/115

That's really pretty great :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment