Skip to content

Commit a1b3e5a

Browse files
Make README more copy/paste friendly and concise.
Also fixed a minor spelling typo.
1 parent feee971 commit a1b3e5a

File tree

1 file changed

+24
-32
lines changed

1 file changed

+24
-32
lines changed

README.md

+24-32
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,20 @@ users / user identities.
55

66
## Get it!
77
```
8-
>:mkdir -p ~/.git/hooks/bin && cd $_
9-
>:git clone git://github.com/frace/git-passport.git
10-
>:chmod +x ./git-passport/git-passport.py
11-
>:_
8+
mkdir -p ~/.git/hooks/bin && cd $_
9+
git clone git://github.com/frace/git-passport.git
10+
chmod +x ./git-passport/git-passport.py
1211
```
1312

1413

1514
## Installation
16-
There are many ways to handle your hooks. What I do in oder to work with
15+
There are many ways to handle your hooks. What I do in order to work with
1716
multiple hooks is the following solution:
1817
```
19-
>:mkdir -p ~/.git/hooks/pre-commit.d && cd $_
20-
>:ln -sf ~/.git/hooks/bin/git-passport/git-passport.py ./00-git-passport
21-
>:mkdir -p ~/.git/templates/hooks && cd $_
22-
>:touch pre-commit && chmod +x $_
23-
>:_
18+
mkdir -p ~/.git/hooks/pre-commit.d && cd $_
19+
ln -sf ~/.git/hooks/bin/git-passport/git-passport.py ./00-git-passport
20+
mkdir -p ~/.git/templates/hooks && cd $_
21+
touch pre-commit && chmod +x $_
2422
```
2523

2624
Add the Git template directory path into your `~/.gitconfig` and create an
@@ -37,15 +35,13 @@ command by invoking `git passport`:
3735
In `~/.git/templates/hooks/pre-commit` I put a little bash script which
3836
loads one hook after another:
3937
```
40-
>:cat ~/.git/templates/hooks/pre-commit
4138
#!/usr/bin/env bash
4239
4340
hooks_pre_commit="${HOME}/.git/hooks/pre-commit.d/"
4441
4542
for hook in ${hooks_pre_commit}*; do
4643
"$hook"
4744
done
48-
>:_
4945
```
5046

5147
Afterwards each `git init` or `git clone` command will distribute
@@ -58,16 +54,14 @@ If you want to apply the hook to already exisiting repos then just run
5854
On the first run `git-passport.py` generates a sample configuration file inside
5955
your home directory:
6056
```
61-
>:cd ~/.git/hooks/bin/git-passport
62-
>:./git-passport.py
63-
No configuration file found in ~/.
64-
Generating a sample configuration file.
65-
>:_
57+
cd ~/.git/hooks/bin/git-passport
58+
./git-passport.py
59+
No configuration file found in ~/.
60+
Generating a sample configuration file.
6661
```
6762

68-
The configuration file is rather self-explanatory:
63+
The configuration file `~/.gitpassport` is rather self-explanatory:
6964
```
70-
>:cat ~/.gitpassport
7165
[general]
7266
enable_hook = True
7367
sleep_duration = 0.5
@@ -81,7 +75,6 @@ service = github.com
8175
8276
name = name_1
8377
service = gitlab.com
84-
>:_
8578
```
8679

8780
Adjust the existing sections and add as many passports as you like by following
@@ -94,18 +87,17 @@ during each `git commit` command.
9487
You can pass the following options if you use `git-passport.py` as a Git
9588
command, too:
9689
```
97-
>:git passport -h
98-
usage: git passport (--select | --delete | --active | --passports)
99-
100-
manage multiple Git identities
101-
102-
optional arguments:
103-
-h show this help message and exit
104-
-s, --select select a passport
105-
-d, --delete delete the active passport in .git/config
106-
-a, --active print the active passport in .git/config
107-
-p, --passports print all passports in ~/.gitpassport
108-
>:_
90+
git passport -h
91+
usage: git passport (--select | --delete | --active | --passports)
92+
93+
manage multiple Git identities
94+
95+
optional arguments:
96+
-h show this help message and exit
97+
-s, --select select a passport
98+
-d, --delete delete the active passport in .git/config
99+
-a, --active print the active passport in .git/config
100+
-p, --passports print all passports in ~/.gitpassport
109101
```
110102

111103

0 commit comments

Comments
 (0)