This is an example Notebook to show how gitInformation works. Import the gitInformation file to you notebook, make sure that you have installed gitpython (#pip install gitpython) and that the notebook file is located in a local git repository.
In [1]:
import gitInformation
If your notebook is located in a git repository, you are now able to plot some informations about the notebook to verify the version. It's not necessary to set the path, the package will find it by its own.
In [2]:
gitInformation.printInformation()
You're also able to set the path by your own to get the git information.
In [3]:
gitInformation.printInformation('C:\Users\Dominik\Documents\GitRep\ipython-notebook-git\example notebook')
It is also possible to print single information like the current branch, Git commit sha, remote and directory
In [4]:
gitInformation.printCurrentBranch()
In [5]:
gitInformation.printCurrentGitSHA()
In [6]:
gitInformation.printCurrentRemote()
In [7]:
gitInformation.printGitDirectory()