A console script that allows you to easily update multiple git repositories at once
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

README.md 2.7 KiB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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. With [Homebrew](http://brew.sh/):
  10. brew install gitup
  11. ## From source
  12. First:
  13. git clone git://github.com/earwig/git-repo-updater.git
  14. cd git-repo-updater
  15. Then, to install for everyone:
  16. sudo python setup.py install
  17. ...or for just yourself (make sure you have `~/.local/bin` in your PATH):
  18. python setup.py install --user
  19. Finally, simply delete the `git-repo-updater` directory, and you're done!
  20. __Note:__ If you are using Windows, you may wish to add a macro so you can
  21. invoke gitup in any directory. Note that `C:\python27\` refers to the
  22. directory where Python is installed:
  23. DOSKEY gitup=c:\python27\python.exe c:\python27\Scripts\gitup $*
  24. # Usage
  25. There are two ways to update repos: you can pass them as command arguments,
  26. or save them as "bookmarks".
  27. For example:
  28. gitup ~/repos/foo ~/repos/bar ~/repos/baz
  29. will automatically pull to the `foo`, `bar`, and `baz` git repositories.
  30. Additionally, you can just type:
  31. gitup ~/repos
  32. to automatically update all git repositories in that directory.
  33. To add a bookmark (or bookmarks), either of these will work:
  34. gitup --add ~/repos/foo ~/repos/bar ~/repos/baz
  35. gitup --add ~/repos
  36. Then, to update all of your bookmarks, just run gitup without args:
  37. gitup
  38. Delete a bookmark:
  39. gitup --delete ~/repos
  40. View your current bookmarks:
  41. gitup --list
  42. You can mix and match bookmarks and command arguments:
  43. gitup --add ~/repos/foo ~/repos/bar
  44. gitup ~/repos/baz # update 'baz' only
  45. gitup # update 'foo' and 'bar' only
  46. gitup ~/repos/baz --update # update all three!
  47. Update all git repositories in your current directory:
  48. gitup .
  49. By default, gitup will fetch all remotes in a repository. Pass `--current-only`
  50. (or `-c`) to make it only fetch the remote tracked by the current branch.
  51. gitup will _merge_ upstream branches by default unless `pull.rebase` or
  52. `branch.<name>.rebase` is specified in your git config. Pass `--rebase` or `-r`
  53. to make it always _rebase_ (this is like doing `git pull --rebase=preserve`).
  54. Pass `--merge` or `-m` to make it always merge.
  55. For a list of all command arguments and abbreviations:
  56. gitup --help
  57. Finally, all paths can be either absolute (e.g. `/path/to/repo`) or relative
  58. (e.g. `../my/repo`).