Skip to content

Commit dfd975d

Browse files
committed
Merge branch 'shell'.
This will place all the current commits from the Shell repository onto this repository, keeping the history of the Node.js version as well.
2 parents a009103 + c983ec8 commit dfd975d

File tree

4 files changed

+1072
-0
lines changed

4 files changed

+1072
-0
lines changed

.gitignore

Whitespace-only changes.

README.md

Lines changed: 253 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,253 @@
1+
`gg`: Git Goodies
2+
=================
3+
4+
### [Looking for the old, unmaintained, and buggy Node.js version?](https://github.com/qw3rtman/gg.js)
5+
6+
![Introduction](http://nimitkalra.com/images/gg/gg.gif)
7+
8+
`gg` helps you *work with `git` more efficiently*, saving you keystrokes for your most prized projects.
9+
10+
Think of `gg` as a wrapper for the `git` commands that you run all the time; a wrapper that adds functionality and is aesthetically pleasing.
11+
12+
### Hold up. Aren't these basically Git aliases?
13+
There's more to the package than just shortcuts or aliases.
14+
15+
For example, the `gg s` command presents you with an easy to look at a quick glance status of your repository. In addition, there are aesthetic changes that increase the intuitiveness of Git itself.
16+
17+
Here's a screenshot of the `gg s` command in action:
18+
19+
![`gg s`](http://nimitkalra.com/images/gg/s.png)
20+
21+
You can see the current local branch and its respective remote branch, the latest commit hash and message, the local repository's position in relation with the respective remote repository (alerting you that you should push two commits to reach up-to-date status with the remote repository), the status of staging and commits, and the commits that waiting to be pushed.
22+
23+
**All of this from one four character command.**
24+
25+
## Installation
26+
```sh
27+
curl -fsSL git.io/gg.sh | sh
28+
```
29+
30+
All this installation script does is download the `gg` script, make it an executable, and copy it to your $PATH (/usr/local/bin). For copying to your $PATH, it may require you to enter your password. If there is a better way to do this, please send in a pull request.
31+
32+
If you don't feel comfortable executing a random script, [its source is available here](https://github.com/qw3rtman/gg/blob/master/install.sh).
33+
34+
`gg` relies solely on `git` and attempts to use built-in Shell features over external programs, such as using Bash substitution instead of `sed`.
35+
36+
## Usage
37+
38+
```
39+
40+
usage:
41+
gg [options] [COMMAND] [args]
42+
43+
commands:
44+
gg Display this help information
45+
gg i Initialize new Git repository
46+
gg ig List available .gitignore templates
47+
gg ig <template> Add .gitignore file from <template>
48+
gg igf <file ...> Add all <file>(s) to .gitignore
49+
gg cl <url> Clone repository from <url>
50+
gg a Add all files
51+
gg a <file ...> Add all <file>(s)
52+
gg c <message> Add all files and commit with <message>
53+
gg cn <message> Commit with <message>
54+
gg uc <count> Go back (uncommit) <count> commits
55+
gg rc <message> Add all files and recommit (amend) with <message>
56+
gg rcn <message> Recommit (amend) with <message>
57+
gg p Push all commits to remote
58+
gg pl Pull all commits from remote
59+
gg f Fetch all commits from remote
60+
gg s Display repository status
61+
gg l Display repository commit log
62+
gg b List all branches in repository
63+
gg b <branch> Create and checkout <branch>
64+
gg ch List all branches in repository
65+
gg ch <branch> Checkout <branch>
66+
gg in <hash> Display info about <hash>
67+
68+
options:
69+
-V, --version Output current version of Git Goodies
70+
-h, --help Display this help information
71+
72+
```
73+
74+
### Initializing repositories
75+
76+
![`gg i`](http://nimitkalra.com/images/gg/init.png)
77+
78+
* `gg i`
79+
* `gg init`
80+
81+
### Adding a template to .gitignore
82+
83+
![`gg ig`](http://nimitkalra.com/images/gg/ignore_template.png)
84+
85+
* `gg ig <template>`
86+
* `gg ignore <template>`
87+
88+
*Templates provided by [.gitignore.io](https://www.gitignore.io/)*
89+
90+
### Adding a file to .gitignore
91+
92+
![`gg igf`](http://nimitkalra.com/images/gg/ignore_file.png)
93+
94+
* `gg igf <file ...>`
95+
* `gg ignorefile <file ...>`
96+
97+
### Cloning a repository
98+
99+
![`gg cl`](http://nimitkalra.com/images/gg/clone.png)
100+
101+
* `gg cl <url>`
102+
* `gg clone <url>`
103+
104+
*The URL can be provided in any format (SSH, HTTP, etc.)*
105+
106+
### Adding all files
107+
108+
![`gg a`](http://nimitkalra.com/images/gg/add.png)
109+
110+
* `gg a`
111+
* `gg add`
112+
113+
### Adding specific files
114+
115+
![`gg a`](http://nimitkalra.com/images/gg/add_file.png)
116+
117+
* `gg a <file ...>`
118+
* `gg add <file ...>`
119+
120+
### Adding all and committing
121+
122+
![`gg c`](http://nimitkalra.com/images/gg/commit.png)
123+
124+
* `gg c <message>`
125+
* `gg commmit <message>`
126+
127+
*If no <message> is provided, a generic one listing all files modified/added will be generated.*
128+
129+
### Committing
130+
131+
![`gg cn`](http://nimitkalra.com/images/gg/commit_no_add.png)
132+
133+
* `gg cn <message>`
134+
135+
*If no <message> is provided, a generic one listing all files modified/added will be generated.*
136+
137+
### Uncommiting (resetting: `git reset HEAD~count`)
138+
139+
![`gg back`](http://nimitkalra.com/images/gg/uncommit.png)
140+
141+
* `gg uc <count>`
142+
* `gg uncommit <count>`
143+
* `gg back <count>`
144+
145+
*If no <count> is provided, 1 will be used.*
146+
147+
### Adding all and recommitting (amending: `git commit --amend`)
148+
149+
![`gg am`](http://nimitkalra.com/images/gg/amend.png)
150+
151+
* `gg rc <message>`
152+
* `gg recommit <message>`
153+
* `gg am <message>`
154+
* `gg amend <message>`
155+
156+
*If no <message> is provided, a generic one listing all files modified/added will be generated.*
157+
158+
### Recommitting (amending: `git commit --amend`)
159+
160+
![`gg am`](http://nimitkalra.com/images/gg/amend_no_add.png)
161+
162+
* `gg rcn <message>`
163+
* `gg amn <message>`
164+
165+
*If no <message> is provided, a generic one listing all files modified/added will be generated.*
166+
167+
### Pushing
168+
169+
![`gg p`](http://nimitkalra.com/images/gg/push.png)
170+
171+
* `gg p`
172+
* `gg push`
173+
174+
### Pulling
175+
176+
![`gg pl`](http://nimitkalra.com/images/gg/pull.png)
177+
178+
* `gg pl`
179+
* `gg pull`
180+
181+
### Fetching
182+
183+
![`gg f`](http://nimitkalra.com/images/gg/fetch.png)
184+
185+
* `gg f`
186+
* `gg fetch`
187+
188+
### Getting repository status
189+
190+
![`gg s`](http://nimitkalra.com/images/gg/status.png)
191+
192+
* `gg s`
193+
* `gg status`
194+
195+
### Displaying commit log
196+
197+
![`gg l`](http://nimitkalra.com/images/gg/log.png)
198+
199+
* `gg l`
200+
* `gg log`
201+
202+
### Listing all branches
203+
204+
![`gg b`](http://nimitkalra.com/images/gg/branch.png)
205+
206+
* `gg b`
207+
* `gg ch`
208+
209+
### Checking out existing branch
210+
211+
![`gg ch`](http://nimitkalra.com/images/gg/checkout.png)
212+
213+
* `gg ch <branch>`
214+
215+
### Creating and checking out new branch
216+
217+
![`gg b`](http://nimitkalra.com/images/gg/branch_checkout.png)
218+
219+
* `gg b <branch>`
220+
221+
### Displaying commit info
222+
223+
![`gg in`](http://nimitkalra.com/images/gg/info.png)
224+
225+
* `gg in <hash>`
226+
* `gg info <hash>`
227+
* `gg view <hash>`
228+
229+
*If no <hash> is provided, HEAD (last commit) will be used.*
230+
231+
### Displaying **Git Goodies** version
232+
233+
![`gg -V`](http://nimitkalra.com/images/gg/version.png)
234+
235+
* `gg -V`
236+
* `gg --version`
237+
238+
### Displaying **Git Goodies** help
239+
240+
![`gg -h`](http://nimitkalra.com/images/gg/help.png)
241+
242+
* `gg`
243+
* `gg -h`
244+
* `gg --help`
245+
* `gg help`
246+
247+
## Contributing
248+
249+
Contributions are always welcome, from a typo in the README to an enhancement of a feature to a completely new feature itself.
250+
251+
Avoid [code smells](http://blog.codinghorror.com/code-smells/), [create reusable code](https://en.wikipedia.org/wiki/Don%27t_repeat_yourself), and follow the loosely-modeled coding standard found in the current code.
252+
253+
Fork the code, make a new branch, and send in a pull request.

0 commit comments

Comments
 (0)