A console script that allows you to easily update multiple git repositories at once
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

преди 13 години
преди 13 години
преди 9 години
преди 13 години
преди 6 години
преди 13 години
преди 13 години
преди 13 години
преди 13 години
преди 13 години
преди 13 години
преди 13 години
преди 13 години
преди 13 години
преди 13 години
преди 13 години
преди 13 години
преди 13 години
преди 13 години
преди 13 години
преди 13 години
преди 13 години
преди 13 години
преди 13 години
преди 13 години
преди 13 години
преди 13 години
преди 13 години
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. __gitup__ (the _git-repo-updater_)
  2. gitup is a tool for updating multiple git repositories at once. It is smart
  3. enough to handle several remotes, dirty working directories, diverged local
  4. branches, detached HEADs, and more. It was originally created to manage a large
  5. collection of projects and deal with sporadic internet access.
  6. gitup should work on macOS, Linux, and Windows. You should have the latest
  7. version of git and either Python 2.7 or Python 3 installed.
  8. # Installation
  9. With [pip](https://github.com/pypa/pip/):
  10. pip install gitup
  11. With [Homebrew](http://brew.sh/):
  12. brew install gitup
  13. ## From source
  14. First:
  15. git clone git://github.com/earwig/git-repo-updater.git
  16. cd git-repo-updater
  17. Then, to install for everyone:
  18. sudo python setup.py install
  19. or for just yourself (make sure you have `~/.local/bin` in your PATH):
  20. python setup.py install --user
  21. Finally, simply delete the `git-repo-updater` directory, and you're done!
  22. __Note:__ If you are using Windows, you may wish to add a macro so you can
  23. invoke gitup in any directory. Note that `C:\python27\` refers to the
  24. directory where Python is installed:
  25. DOSKEY gitup=c:\python27\python.exe c:\python27\Scripts\gitup $*
  26. # Usage
  27. There are two ways to update repos: you can pass them as command arguments,
  28. or save them as "bookmarks".
  29. For example:
  30. gitup ~/repos/foo ~/repos/bar ~/repos/baz
  31. will automatically pull to the `foo`, `bar`, and `baz` git repositories.
  32. Additionally, you can just type:
  33. gitup ~/repos
  34. to automatically update all git repositories in that directory.
  35. To add bookmarks, either of these will work:
  36. gitup --add ~/repos/foo ~/repos/bar ~/repos/baz
  37. gitup --add ~/repos
  38. Then, to update all of your bookmarks, just run gitup without args:
  39. gitup
  40. Delete a bookmark:
  41. gitup --delete ~/repos
  42. View your current bookmarks:
  43. gitup --list
  44. You can mix and match bookmarks and command arguments:
  45. gitup --add ~/repos/foo ~/repos/bar
  46. gitup ~/repos/baz # update 'baz' only
  47. gitup # update 'foo' and 'bar' only
  48. gitup ~/repos/baz --update # update all three!
  49. Update all git repositories in your current directory:
  50. gitup .
  51. You can control how deep gitup will look for repositories in a given directory,
  52. if that directory is not a git repo by itself, with the `--depth` (or `-t`)
  53. option. `--depth 0` will disable recursion entirely, meaning the provided paths
  54. must be repos by themselves. `--depth 1` will descend one level (this is the
  55. old behavior from pre-0.5 gitup). `--depth -1` will recurse indefinitely,
  56. which is not recommended. The default is `--depth 3`.
  57. By default, gitup will fetch all remotes in a repository. Pass `--current-only`
  58. (or `-c`) to make it fetch only the remote tracked by the current branch.
  59. Also by default, gitup will try to fast-forward all branches that have
  60. upstreams configured. It will always skip branches where this is not possible
  61. (e.g. dirty working directory or a merge/rebase is required). Pass
  62. `--fetch-only` (or `-f`) to skip this step and only fetch remotes.
  63. After fetching, gitup will _keep_ remote-tracking branches that no longer exist
  64. upstream. Pass `--prune` (or `-p`) to delete them, or set `fetch.prune` or
  65. `remote.<name>.prune` in your git config to do this by default.
  66. For a full list of all command arguments and abbreviations:
  67. gitup --help