Uploading existing unversioned code to a new repo on GitHub

I always seem to forget how to solve this problem, and it always starts the same way: me wanting to upload an already existent code to my repository. In case you never did this you should probably follow GitHub’s tutorial first. Basically the setup is as follows: $ git init…

Displaying git information in Rails

Here is a code snippet that placed within an initializer (for example, in git_info.rb at /config/initializers path) can print in your app useful info about the current version of your web app and when it was pushed. You just have to print them wherever you want. GITBRANCH…