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
104 105 106 107 108 |
# File 'lib/git/base.rb', line 104 def chdir # :yields: the Git::Path Dir.chdir(dir.path) do yield dir.path end end |