Skip to content

Commit 2db5b83

Browse files
committed
update README for zsh
1 parent 531dbaa commit 2db5b83

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

README.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
1-
21
# git-commands
32

43
A collection of useful git commands.
54

65
## Installation
76

8-
git clone https://github.com/ricardobeat/git-commands ~/.git-commands
7+
Clone the repo and add it to your `PATH`:
8+
9+
```shell
10+
git clone https://github.com/ricardobeat/git-commands ~/.git-commands
911

10-
echo export PATH="~/.git-commands:$PATH" > ~/.profile
12+
echo export PATH="$PATH:$HOME/.git-commands" > ~/.zshrc # use .profile for bash
13+
```
1114

1215
### git author-stats
1316

@@ -47,7 +50,7 @@ Display authors of files containing `string`, ranked by frequency.
4750

4851
### git open
4952

50-
Simultaneously open all changed files using `$EDITOR`, according to `git status`. Lets you pick up
53+
Simultaneously open all changed files using `$EDITOR`, according to `git status`. Lets you pick up
5154
work in progress without depending on editor 'projects' state.
5255

5356
### git rank
@@ -58,7 +61,7 @@ Display ranking of authors by number of commits + extra stats.
5861

5962
### git remaster
6063

61-
While working in a branch, `fetch` latest `master`, then rebase current branch on top of that. Use
64+
While working in a branch, `fetch` latest `master`, then rebase current branch on top of that. Use
6265
to keep in sync with main development branch.
6366

6467
### git repush
@@ -72,12 +75,12 @@ Run GC + prune. Optimized for a huge (~100k files) repository, might not work fo
7275

7376
### git size [commit]
7477

75-
Show the size in bytes introduced (or removed) by a specific commit. Accepts any ref identifier
78+
Show the size in bytes introduced (or removed) by a specific commit. Accepts any ref identifier
7679
that git understands: hashes, `HEAD^`, etc.
7780

7881
### git snapshot [note]
7982

80-
Create a named stash, including an optional text note. This will *not* be featured in the stash list,
83+
Create a named stash, including an optional text note. This will _not_ be featured in the stash list,
8184
only in reflog (and will be GCed at some point). Use as safety checkpoints while furiously changing code.
8285

8386
### git sort [hashes]
@@ -98,6 +101,7 @@ can be overriden by setting the `N` environment var.
98101
### git stash-merge
99102

100103
Commands like `git stash pop` will refuse to apply over a dirty tree, even when an automatic merge is possible.
104+
101105
The `stash-merge` command will create a new stash object from your state and try to `merge` them together.
102-
In chase the the merge fails you still have both in stash list.
103106

107+
In case the the merge fails you still have both in stash list.

0 commit comments

Comments
 (0)