Class: ActualDbSchema::Git
- Inherits:
-
Object
- Object
- ActualDbSchema::Git
- Defined in:
- lib/actual_db_schema/git.rb
Overview
Git helper
Class Method Summary collapse
Class Method Details
.current_branch ⇒ Object
6 7 8 9 10 11 |
# File 'lib/actual_db_schema/git.rb', line 6 def self.current_branch branch = `git rev-parse --abbrev-ref HEAD 2>/dev/null`.strip branch.empty? ? "unknown" : branch rescue Errno::ENOENT "unknown" end |