Method: Cir::GitRepository#add_file
- Defined in:
- lib/cir/git_repository.rb
#add_file(file) ⇒ Object
Adds given file to index, so that it’s properly tracked for next commit. This file must contain local path relative to the root of working directory.
42 43 44 45 46 |
# File 'lib/cir/git_repository.rb', line 42 def add_file(file) index = @repo.index index.add path: file, oid: (Rugged::Blob.from_workdir @repo, file), mode: 0100644 index.write end |