A console script that allows you to easily update multiple git repositories at once
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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. # Usage
  22. There are two ways to update repos: you can pass them as command arguments,
  23. or save them as "bookmarks".
  24. For example:
  25. gitup ~/repos/foo ~/repos/bar ~/repos/baz
  26. will automatically pull to the `foo`, `bar`, and `baz` git repositories.
  27. Additionally, you can just type:
  28. gitup ~/repos
  29. to automatically update all git repositories in that directory.
  30. To add a bookmark (or bookmarks), either of these will work:
  31. gitup --add ~/repos/foo ~/repos/bar ~/repos/baz
  32. gitup --add ~/repos
  33. Then, to update all of your bookmarks, just run gitup without args:
  34. gitup
  35. Delete a bookmark:
  36. gitup --delete ~/repos
  37. View your current bookmarks:
  38. gitup --list
  39. You can mix and match bookmarks and command arguments:
  40. gitup --add ~/repos/foo ~/repos/bar
  41. gitup ~/repos/baz # update 'baz' only
  42. gitup # update 'foo' and 'bar' only
  43. gitup ~/repos/baz --update # update all three!
  44. Update all git repositories in your current directory:
  45. gitup .
  46. By default, gitup will fetch all remotes in a repository. Pass `--current-only`
  47. (or `-c`) to make it only fetch the remote tracked by the current branch.
  48. gitup will _merge_ upstream branches by default unless `pull.rebase` or
  49. `branch.<name>.rebase` is specified in git's config. Pass `--rebase` or `-r` to
  50. make it always _rebase_ (like doing `git pull --rebase=preserve`). Pass
  51. `--merge` or `-m` to make it always merge.
  52. For a list of all command arguments and abbreviations:
  53. gitup --help
  54. Finally, all paths can be either absolute (e.g. `/path/to/repo`) or relative
  55. (e.g. `../my/repo`).