Title: Theory / Unimportant / CS / Programming / Python / Lib / GitPython
Tags: seen_description automatedNewLineAfterCommaSpace
On every note of this deck, unless a note says otherwise:
Page: https://gitpython.readthedocs.io/en/stable/tutorial.html

Instruction: Repo(path)
Language: Python
Returns: A repository object representing the git repositery situated at position path

Instruction: Repo.init(
  path,
  bare=True
)
Effect: Create a repo at path path
Language: Python
Context: gitpython

Instruction: r.config_reader()
Language: Python
Context: GitPython repo
Returns: A config reader for r
Variables: r a repo

Instruction: r.untracked_file
Language: Python
Context: GitPython
Returns: List of untracked fields
Variables: r a repo

Instruction: r.config_writer()
Language: Python
Returns: A config writer for r
Variables: r a repo

Instruction: r.is_dirty()
Language: Python
Returns: Whether repo is dirty
Variables: r a repo

Instruction: r.archive(fp)
Effect: Write the rep as tar in the file fp
Language: Python
Variables: r a repo
fp a file

Instruction: r.working_tree_dir
Language: Python
Returns: Path to working tree
Variables: r a repo

Instruction: r.git_dir
Language: Python
Returns: Path to the git repository
Variables: r a repo

Instruction: r.tags[foo] r.tag(foo)
Language: Python
Returns: The commit referenced by tag foo
Variables: r a repo

Instruction: r.commit("Foo")
Language: Python
Returns: The commit at revision foo
Variables: r a repo

Instruction: r.iter_commit(
  "Foo",
  max_count=,
  skip=0
)
Language: Python
Returns: An iterator returning up to max_count commits from the history of foo, skipping the skip first one
Variables: r a repo

Instruction: r.git.foo(
  *args,
  **kwargs
)
Effect: Same as git foo with argument args and kwargs
Language: Python
Variables: r a repo