Method: Git::Base#chdir

Defined in:
lib/git/base.rb

#chdir

changes current working directory for a block to the git working directory

example @git.chdir do # write files @git.add @git.commit('message') end

[View source]

216
217
218
219
220
# File 'lib/git/base.rb', line 216

def chdir # :yields: the Git::Path
  Dir.chdir(dir.path) do
    yield dir.path
  end
end