Method: Git::Base#chdir
- Defined in:
- lib/git/base.rb
#chdir ⇒ Object
changes current working directory for a block to the git working directory
example
@git.chdir do
# write files
@git.add
@git.commit('message')
end
114 115 116 117 118 |
# File 'lib/git/base.rb', line 114 def chdir # :yields: the Git::Path Dir.chdir(dir.path) do yield dir.path end end |