Coder Social home page Coder Social logo

cesarferreira / gito Goto Github PK

View Code? Open in Web Editor NEW
26.0 2.0 1.0 2.57 MB

:zap: git helper tool to clone/open/auto-install/edit with a one-liner

Ruby 100.00%
git gito tool ruby nodejs gradle golang cocoapods carthage python swift-package-manager

gito's Introduction

gito

Gem Version Build Status Code Climate

git helper tool to clone/open/auto-install/edit a git project with a one-liner.

> gito cesarferreira/dryrun -e

Features

  • Quickly clone any git project and changes directory.
  • Can automatically open the folder in finder .
  • Can automatically open the project in any editor.
  • Can clone the project into a system temporary folder.
  • Auto detects project type and auto installs dependencies accordingly.
  • The project type detections can be added without releasing a new gem version.

Usage

๐Ÿš™ git clones this url: https://github.com/cesarferreira/dryrun

$ gito cesarferreira/dryrun

๐Ÿš• git clone, install, open and edit the project

$ gito cesarferreira/dryrun --edit --open

๐Ÿš— git clone on a operating system /temp/ folder, install, and edit the project

$ gito cesarferreira/dryrun --edit --temp

๐Ÿš“ set the editor to be 'subl' from now on

$ gito cesarferreira/dryrun -s subl

๐Ÿš• git clone, install, open and edit the project from github on a temp folder

$ gito https://github.com/cesarferreira/dryrun -e -o -t

๐ŸŽ git clone, install from another git source

$ gito https://bitbucket.org/username/project

Installation

$ gem install gito

Help

$ gito -h
Usage: gito GIT_URL [OPTIONS]

Options
    -s, --set-editor EDITOR          Set a custom editor to open the project (e.g. "atom", "subl", "vim", etc.
    -e, --edit                       Open the project on an editor
    -o, --open                       Open the project on Finder
    -d, --dryrun                     Does not install the dependencies
    -t, --temp                       Clones the project into a temporary folder
    -k, --keep                       Clones the whole git history and not just the last snapshot
    -h, --help                       Displays help
    -v, --version                    Displays the version

Supported type detections/auto-installs

So far it auto-installs these types:

  • Ruby
  • Gradle
  • node.js
  • C/C++
  • Elixir
  • Python
  • Go (Govendor, Glide)
  • Cocoapods
  • Carthage
  • Swift Package Manager
  • Rust
  • Haskell

Create a pull request by editing detector.json file if you want more types to be added.

Why?

A lot of times I find myself wanting to try some code from github and in order to do so I have to copy the git URL, go to the terminal, git clone, find out the folder name, go to the folder and based on the type of project I need to bundle install, ./gradlew assemble, npm install, pip install ., mix deps.get, make install, you name it. And after that, opening it in my text editor of choice manually... Not anymore!

Contributing

I welcome and encourage all pull requests. It usually will take me within 24-48 hours to respond to any issue or request. Here are some basic rules to follow to ensure timely addition of your request:

  1. If its a feature, bugfix, or anything please only change code to what you specify.
  2. Please keep PR titles easy to read and descriptive of changes, this will make them easier to merge :)
  3. Pull requests must be made against develop branch. Any other branch (unless specified by the maintainers) will get rejected.
  4. Check for existing issues first, before filing an issue.
  5. Have fun!

Created & Maintained By

Cesar Ferreira (@cesarmcferreira)

gito's People

Contributors

cesarferreira avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

deyvisonrocha

gito's Issues

flag ordering shouldn't matter

> gito -e cesarferreira/gito
~/.gem/ruby/2.4.1/gems/gito-0.4.13/lib/gito/project.rb:36:in `destination': undefined method `gsub' for nil:NilClass (NoMethodError)
	from ~/.gem/ruby/2.4.1/gems/gito-0.4.13/lib/gito/project.rb:12:in `initialize'
	from ~/.gem/ruby/2.4.1/gems/gito-0.4.13/lib/gito.rb:107:in `new'
	from ~/.gem/ruby/2.4.1/gems/gito-0.4.13/lib/gito.rb:107:in `call'
	from ~/.gem/ruby/2.4.1/gems/gito-0.4.13/bin/gito:6:in `<top (required)>'
	from ~/.gem/ruby/2.4.1/bin/gito:22:in `load'
	from ~/.gem/ruby/2.4.1/bin/gito:22:in `<main>'
> gito cesarferreira/gito -e
๐Ÿ˜™  Cloning [email protected]:cesarferreira/gito.git...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.