Using Bundler with Git, is https:// or git:// better?

Using bundler to install a gem from github, there are two obvious choices; https:// or git://.

From the default rails template;

  • Failed to push to Heroku. Don't understand what's wrong
  • What is the best way to keep javascript libraries up-to-date in rails?
  • How to force the update of a gem with bundler?
  • Conflicts in Gemfile.lock while rebasing
  • Gemfile.lock always has changes not staged for commit
  • using bundler to load different versions of gems for different platforms
  • gem "rails", :git => "git://"

    But, when viewing the rails repo on github, the default clone url is the https:// url.

    Copying and pasting straight from github, I’d end up with;

    gem "rails", :git => ""

    These two lines are almost the same, but not quite.

    Is there any benefit to git:// over https://?

    Is one of them faster to do a bundle install?

    Is doing an https:// checkout easier to cache from githubs perspective?

  • What happens if I rebase after pushing?
  • Git: Says master is up to date, but when deleting branch it says it isnt'
  • gitolite disallow access for directory on master branch but not on user branch
  • Git checking out remote branch without specifying `origin/`
  • Why the `git commit -am` command is working with untraсked file (in the documentation's samples)?
  • How do you manage 3rd person git repositories in your project? (ex. Twig/Assetic/..)
  • 2 Solutions collect form web for “Using Bundler with Git, is https:// or git:// better?”

    They will be pretty much the same. If you are behind a firewall etc. you might consider the https one. git protocol might be slightly faster ( and is read-only), but it is negligible.

    If you don’t care about firewall, use git protocol for bundler purposes as it is the right intent – read only clone of a repo.

    The git protocol gives better performance and reliability, but on a host with a web server set up, http exports may be simpler to set up.

    follow git user manual.

    Git Baby is a git and github fan, let's start git clone.