A console script that allows you to easily update multiple git repositories at once
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

README.md 2.7 KiB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. __gitup__ (the _git-repo-updater_)
  2. gitup is a tool designed to update a large number of git repositories at once.
  3. It is smart enough to handle multiple remotes, branches, dirty working
  4. directories, and more, hopefully providing a great way to get everything
  5. up-to-date for short periods of internet access between long periods of none.
  6. gitup should work on OS X, Linux, and Windows. You should have the latest
  7. version of git and at least Python 2.7 installed.
  8. # Installation
  9. First:
  10. git clone git://github.com/earwig/git-repo-updater.git
  11. cd git-repo-updater
  12. Then, to install for everyone:
  13. sudo python setup.py install
  14. ...or for just yourself (make sure you have `~/.local/bin` in your PATH):
  15. python setup.py install --user
  16. Finally, simply delete the `git-repo-updater` directory, and you're done!
  17. __Note:__ If you are using Windows, you may wish to add a macro so you can
  18. invoke gitup in any directory. Note that `C:\python27\` refers to the
  19. directory where Python is installed:
  20. DOSKEY gitup=c:\python27\python.exe c:\python27\Scripts\gitup $*
  21. # Homebrew Installation
  22. `brew install pr0d1r2/contrib/gitup && brew link gitup`
  23. # Usage
  24. There are two ways to update repos: you can pass them as command arguments,
  25. or save them as "bookmarks".
  26. For example:
  27. gitup ~/repos/foo ~/repos/bar ~/repos/baz
  28. will automatically pull to the `foo`, `bar`, and `baz` git repositories.
  29. Additionally, you can just type:
  30. gitup ~/repos
  31. to automatically update all git repositories in that directory.
  32. To add a bookmark (or bookmarks), either of these will work:
  33. gitup --add ~/repos/foo ~/repos/bar ~/repos/baz
  34. gitup --add ~/repos
  35. Then, to update all of your bookmarks, just run gitup without args:
  36. gitup
  37. Delete a bookmark:
  38. gitup --delete ~/repos
  39. View your current bookmarks:
  40. gitup --list
  41. You can mix and match bookmarks and command arguments:
  42. gitup --add ~/repos/foo ~/repos/bar
  43. gitup ~/repos/baz # update 'baz' only
  44. gitup # update 'foo' and 'bar' only
  45. gitup ~/repos/baz --update # update all three!
  46. Update all git repositories in your current directory:
  47. gitup .
  48. By default, gitup will fetch all remotes in a repository. Pass `--current-only`
  49. (or `-c`) to make it only fetch the remote tracked by the current branch.
  50. gitup will _merge_ upstream branches by default unless `pull.rebase` or
  51. `branch.<name>.rebase` is specified in git's config. Pass `--rebase` or `-r` to
  52. make it always _rebase_ (like doing `git pull --rebase=preserve`). Pass
  53. `--merge` or `-m` to make it always merge.
  54. For a list of all command arguments and abbreviations:
  55. gitup --help
  56. Finally, all paths can be either absolute (e.g. `/path/to/repo`) or relative
  57. (e.g. `../my/repo`).