/python-gitpath

A small python module to make working in git repos easier

Primary LanguagePythonMIT LicenseMIT

gitpath

A few functions to make working with python inside git repos easier.

path handling

gitpath.root() returns the absolute path of the repository root directory

gitpath.abspath(_rel_path_) returns an absolute path for a path given relative to the root directory, so assuming, this repo resites in /home/maxnoe/python-gitpath:

import gitpath

print(gitpath.abspath('setup.py'))

Will give you: /home/maxnoe/python-gitpath/setup.py


Installation

pip install git+https://github.com/ruxi/python-gitpath.git