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?

  • Proper way to customize Bower-installed components
  • Unable to push to phpfog, permission denied (publickey)
  • How can I version-control my SQL Server database files with Git?
  • Start from GitHub repo, clone it privately in BitBucket, and also grab changes from the original?
  • Count commits on one branch not on another
  • Move a directory in a git repo to another git repo, preserving part of commit history
  • Is there a way to diagnose why git init --bare doesn't create specific directories?
  • Can I write a more compact rule for git add?
  • Fork-specific git log
  • git status and git diff empty after failed git am
  • Git workflow - Reverting a feature branch from release branch
  • Commit-hook: mark “bugs-everywhere” issue mentioned in the message as done
  • 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.