Class: SafePusher::Client::Git

Inherits:
Object
  • Object
show all
Defined in:
lib/safe_pusher/client/git.rb

Instance Method Summary collapse

Instance Method Details

#addObject



10
11
12
13
14
# File 'lib/safe_pusher/client/git.rb', line 10

def add
  system('git add --interactive')

  $CHILD_STATUS.exitstatus
end

#amendObject



4
5
6
7
8
# File 'lib/safe_pusher/client/git.rb', line 4

def amend
  system('git commit --amend')

  $CHILD_STATUS.exitstatus
end

#commitObject



16
17
18
19
20
21
22
23
24
# File 'lib/safe_pusher/client/git.rb', line 16

def commit
  puts 'Enter a message for your commit:'

  result = STDIN.gets.chomp

  system("git commit -m '#{result}'")

  $CHILD_STATUS.exitstatus
end