Fetch Current Branch and Latest Commit_ID in Rails Application
Sometimes while running project on a staging server, we can are required to check the current branch and latest commit for the code. Simply create a new Initializer file
and now you can use these
GIT_COMMIT anywhere in your views and as per requirement.