There is a python library used to interact with Git repositories
It can be used in Fetching Remote Git Repo with Python, e.g..
There's also the old fashioned way
But I think you will find Git to be Python version independent, and that possibly you want to associate Python code, files and extensions with Python 3.4 rather than 2.7, and that would be via
How is it determined which application is to open a file of specific mime-type?
How to change the default application for a given type of file in Ubuntu Linux
For example, I use Idlex as an IDE. I've added
text/x-python=idlex3.desktop to the
~/.local/share/applications/mimeapps.list file. Now, double clicking on a Python file opens that file in the IDE to be looked at, edited, and/or run.