1 | # git-pull-all
|
2 |
|
3 | Concurrent [git-pull(1)][git-pull] executor for multiple git repositories.
|
4 |
|
5 | [git-pull-all] is a command line tool to execute [git-pull] on multiple git repositories in parallel. Because it is asynchronous, it works really well especially for **many** projects and must be a lot faster than any synchronous ways, such as:
|
6 |
|
7 | ```sh
|
8 | #!/bin/sh
|
9 | find . -type d -name .git -exec sh -c "cd \"{}\"/../ && pwd && git pull" \;
|
10 | ```
|
11 |
|
12 | ## Installation
|
13 |
|
14 | Using [npm]:
|
15 |
|
16 | ```
|
17 | $ npm install -g git-pull-all
|
18 | ```
|
19 |
|
20 | ## Usage
|
21 |
|
22 | Assume you have these files and directories:
|
23 |
|
24 | ```
|
25 | ~/Projects/
|
26 | cool-examples/
|
27 | .git/
|
28 | funny-movies/
|
29 | my-todos.txt
|
30 | super-express/
|
31 | .git/
|
32 | ```
|
33 |
|
34 | When you run `git-pull-all` command on `~/Projects` directory, it should find child git repositories (in the above case *cool-examples* and *super-express*) then execute `git pull` on each of them.
|
35 |
|
36 | ```
|
37 | $ cd ~/Projects
|
38 | $ git-pull-all
|
39 | funny-movies/
|
40 | Not a git repository
|
41 | cool-examples/
|
42 | Already up-to-date.
|
43 | super-express/
|
44 | Already up-to-date.
|
45 | Done!
|
46 | ```
|
47 |
|
48 | You can also specify the path where the command is executed.
|
49 |
|
50 | ```
|
51 | $ git-pull-all ~/Projects
|
52 | ```
|
53 |
|
54 | ## Licence
|
55 |
|
56 | MIT
|
57 |
|
58 | [git-pull]: http://git-scm.com/docs/git-pull
|
59 | [git-pull-all]: https://github.com/tatsuyaoiw/git-pull-all
|
60 | [npm]: https://www.npmjs.com/ |
\ | No newline at end of file |