instance method
git
Ruby on Rails 6.1.7.10
Since v3.0.20Signature
git(commands = {})
Run a command in git.
git :init git add: "this.file that.rb" git add: "onefile.rb", rm: "badfile.cxx"
Parameters
-
commandsopt = {}
Source
# File railties/lib/rails/generators/actions.rb, line 142
def git(commands = {})
if commands.is_a?(Symbol)
run "git #{commands}"
else
commands.each do |cmd, options|
run "git #{cmd} #{options}"
end
end
end
Defined in railties/lib/rails/generators/actions.rb line 142
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Rails::Generators::Actions