https://github.com/magynhard/git_repo_upgrader
Copy specific files from another git repo by one command
https://github.com/magynhard/git_repo_upgrader
files git repository ruby ruby-gem upgrade-tool
Last synced: about 2 months ago
JSON representation
Copy specific files from another git repo by one command
- Host: GitHub
- URL: https://github.com/magynhard/git_repo_upgrader
- Owner: magynhard
- License: mit
- Created: 2020-09-17T19:58:03.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2025-11-14T08:39:36.000Z (8 months ago)
- Last Synced: 2026-04-16T22:13:09.292Z (3 months ago)
- Topics: files, git, repository, ruby, ruby-gem, upgrade-tool
- Language: Ruby
- Homepage:
- Size: 23.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# git_repo_upgrader
[](https://rubygems.org/gems/git_repo_upgrader)

[](LICENSE)
> Copy specific files from another git repository into your current project and provide (optional) automatic commits.
Useful to integreate foreign git repo file based dependencies in your project or build. Do upgrades by one command.
> [!NOTE]
> Early PoC with limited feature set.
# Contents
* [Installation](#installation)
* [Usage](#usage)
* [Documentation](#documentation)
* [Contributing](#contributing)
### Prerequisites
Git must be installed and its bin directory must be included in `PATH` variable.
### Add gem to your ruby project
Add this line to your application's Gemfile:
```ruby
gem 'git_repo_upgrader'
```
And then execute:
$ bundle install
Or install it yourself as:
$ gem install git_repo_upgrader
At best create a new rake task containing a options hash and then run #upgrade.
See the examples below for option hashes.
### Examples
#### Basic
```ruby
options = {
repo: {
uri: 'https://github.com/username/project.git',
branch: 'develop',
},
files_to_copy: {
'dist/app.bundle.js' => 'web/js/lib/project/app.bundle.js',
'dist/app.bundle.css' => 'web/js/lib/project/app.bundle.css',
# copy a whole directory recursively
'dist/img' => 'web/js/lib/project/img',
},
commit: 'prompt' # 'prompt' by default, other options: 'false','auto'
}
GitRepoUpgrader.upgrade options
```
## Documentation
Check out the doc at RubyDoc
https://www.rubydoc.info/gems/git_repo_upgrader
Bug reports and pull requests are welcome on GitHub at https://github.com/magynhard/git_repo_upgrader. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.