Checkout a particular ref from git inside a particular directory
Add this line to your application's Gemfile:
gem 'git_refresh'
And then execute:
$ bundle
Or install it yourself as:
$ gem install git_refresh
- see git_refresh --help for most current instructions
git_refresh refresh --source-url https://github.com/foo/bar.git --target-dir /tmp/bar
git_refresh refresh --source-url https://github.com/foo/bar.git --target-dir /tmp/bar --ref mybranch
- If you can't find the
git_refresh
command and your usingrbenv
be sure to runrbenv rehash
after installing the gem to create the necessary symlinks
This software is not supported by Puppet, Inc. Use at your own risk.
Bug reports and pull requests are welcome on GitHub at https://github.com/GeoffWilliams/git_refresh.
- git_refresh includes a comprehensive tests. Please ensure tests pass before and after any PRs
- Run all tests
bundle exec rake spec
- Run specific test file
bundle exec rspec ./spec/SPEC/FILE/TO/RUN.rb
- Run specific test case
bundle exec rspec ./spec/SPEC/FILE/TO/RUN.rb:99
(where 99 is the line number of the test)