Class: YJCocoa::Git
- Defined in:
- lib/yjcocoa/git/git.rb
Overview
Usage
Direct Known Subclasses
Constant Summary
Constants inherited from Command
Instance Method Summary collapse
Methods inherited from Command
Instance Method Details
#gitExist? ⇒ Boolean
22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/yjcocoa/git/git.rb', line 22 def gitExist? if File.exist?(".git") return true elsif Dir.pwd == "/" puts "fatal: Not a git repository (or any of the parent directories): .git".red return false end Dir.chdir("..") { return self.gitExist? } end |