Class: Gitgit::CLI
Overview
Your code goes here…
Instance Method Summary collapse
Instance Method Details
#init ⇒ Object
11 12 13 14 |
# File 'lib/gitgit.rb', line 11 def init Git.init say "Git repo created! Let's git going ...", :green end |
#lg ⇒ Object
26 27 28 29 |
# File 'lib/gitgit.rb', line 26 def lg g = Git.open('.') g.log(20).each {|l| puts l } end |
#save ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/gitgit.rb', line 17 def save yes? "Do you really want to save?" m = ask "Give a short description of the work you're saving: " g = Git.open('.') g.add(all:true) g.commit(m) end |