Skip to content

SmileZero/fgit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fgit

Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file lib/fgit. To experiment with that code, run bin/console for an interactive prompt.

This tool is just make command more easy to use for file manipulating from branch to branch base on git command

Installation

Add this line to your application's Gemfile:

gem 'fgit'

And then execute:

$ bundle

Or install it yourself as:

$ gem install fgit

Usage

  • list all relative file paths in given branch by a filename or a regular expression of filename
  • copy all files from given branch by a filename or a regular expression of filename
Commands:
  fgit ls BRANCH FILE_NAME
    list all relative file paths in given branch by a filename or a regular expression of filename

    for example:
      fgit ls origin/develop-2.0 top_image_001.png
      fgit ls origin/develop-2.0 "profile_54321\d+\.json"

  fgit cp BRANCH FILE_NAME
    copy all files from given branch by a filename or a regular expression of filename

    with --force -f option: force to copy all files without confirm and ignore unstaged local changes

    for example:
      fgit cp origin/develop-2.0 top_image_001.png
      fgit cp origin/develop-2.0 profile_12345.+\.json

Contributing

Welcome any contrbutions to this project.

  1. Fork it ( https://github.com/[my-github-username]/fgit/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages