This Ruby gem installs the git-update command,
which scans git directory trees and updates them.
Directories containing a file called .ignore are ignored.
The git-update command requires at least one parameter:
the names of the top-level directories to update.
The following updates the directory tree of git repos under the /data/work directory:
$ git update /data/workThe following accomplishes the same thing:
$ export work=/data/work
$ git update $workThe following accomplishes the same thing:
$ git-update $workThe following updates the directory trees of git repos pointed to by $work and $sites:
$ export work=/data/work
$ export sites=/var/www
$ git update $work $sitesType the following at a shell prompt:
$ gem install git_treeMore information is available on Mike Slinn’s website
After checking out the repo, run bin/setup to install dependencies.
You can run bin/console for an interactive prompt that will allow you to experiment.
$ bin/console
irb(main):001:0> GitUpdate.command_update '/var/www'To build and install this gem onto your local machine, run:
$ bundle exec rake installExamine the newly built gem:
$ gem info git_update
*** LOCAL GEMS ***
git_update (0.1.0)
Author: Mike Slinn
Homepage:
https://github.com/mslinn/git_update
License: MIT
Installed at: /home/mslinn/.gemsTo release a new version:
-
Update the version number in
version.rb. -
Commit all changes to git; if you don't the next step might fail with an unexplainable error message.
-
Run the following:
$ bundle exec rake releaseThe above creates a git tag for the version, commits the created tag, and pushes the new
.gemfile to RubyGems.org.
- Fork the project
- Create a descriptively named feature branch
- Add your feature
- Submit a pull request
The gem is available as open source under the terms of the MIT License.