Should I add the Rails 4 bin/ directory to git?

After I upgraded to Rails 4, the bin/ directory appeared. Do I need to commit this to git, or should I leave it for bundler to regenerate on the server?

  • How do you release a bugfix to a previous version and tag it?
  • Error 0x2 starting node.exe -v in Git bash for Windows
  • When using php exec() to run shell scripts, one script works (which simply does git status) and one doesn't (which does git checkout). How come?
  • Git clone issue; fatal: index-pack failed
  • How to discard uncommitted changes in SourceTree?
  • How can I have linked dependencies in a git repo?
  • How to create a branch under another branch in git?
  • Dart - How to check if Git is correctly installed?
  • How to get rid of “merge branch…” automatic messages in git repository
  • How can I get rid of “Lost heads”?
  • Import bitbucket into PHPStorm
  • public key denied, but ssh key accepted
  • 2 Solutions collect form web for “Should I add the Rails 4 bin/ directory to git?”

    According to this article you should add it.

    This will generate a bin directory in the root of your application. Make sure that it is not in your .gitignore file, and check this directory and its contents into git.

    Here is the message from Rails w.r.t bin/ directory:

    In Rails 4, your app’s bin/ directory contains executables that are
    versioned like any other source code, rather than stubs that are
    generated on demand. Here’s how to upgrade:

    bundle config --delete bin    # Turn off Bundler's stub generator
    rake rails:update:bin         # Use the new Rails 4 executables
    git add bin                   # Add bin/ to source control

    You may need to remove bin/ from your .gitignore as well.

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