All Questions
Tagged with gitpython python-2.7
14 questions
0
votes
1
answer
89
views
How to get Number of files touched, Number of lines added, Number of lines removed from for commit in repo.iter_commits(branch) using python git?
I would like to store the following info per commit like so,
for commit in repo.iter_commits(branch):
author_name=commit.author.name
commit_id=commit
commit_authored_date=datetime.datetime....
0
votes
0
answers
153
views
Returning all repos under a given root path using GitPython
If I provide a root path such as ("C:/ProgramFiles") to the function,
the code should give a list, where each element is the
(local path of this repo found under the root path, remote URL, ...
0
votes
2
answers
146
views
Is it possible to end in git detached head from pull, push, fetch or rebase?
I have a python server application that handles a git repository. It creates commits and switches branches to apply changes locally and then pushes them to the remote repo.
For some reason, users that ...
1
vote
1
answer
289
views
Git python API returns invalid branch name when using tag
I am trying to checkout a branch with a tag that references a commit. I keep getting an error that the branch name is invalid because it is trying to take the tag name as part of my branch. I am using ...
0
votes
1
answer
2k
views
pip install gitpython fails with python 3.x requirement
When I try to install gitpython via pip normally under python 2.7, it fails telling me python 3.x is required.
This particular script/process has worked until this morning.
$ sudo pip install ...
1
vote
1
answer
882
views
I see scapy ipsec.py python code in GitHub: how do I install and use it?
There is a python module to generate IPSec packets using scapy in GitHub, but that file is not in its own .git extension to download.
Please find the link for the code:https://github.com/secdev/...
3
votes
0
answers
2k
views
Gitpython - can't clone from remote repo using private ssh key
I'm trying to clone a project from git using Python's Gitpython library, but instead of password i want to use ssh keys for authentication. I've created a pair of private and public keys and put the ...
0
votes
0
answers
384
views
GitPython Via HTTPS
I am currently trying to push to Git via GitPython using HTTPS. I am able to do this successfully, but I am prompted to enter my username and password for every fetch, push, and pull operation.
I ...
3
votes
2
answers
6k
views
Can't use gitpython in AWS lambda
I've been trying to use the gitpython package in aws lambda. I've used python2.7 environment. I bundled up gitpython using this along with my python code into a zip file and uploaded.
import json
...
14
votes
2
answers
19k
views
gitpython: Command syntax for git commit
with using gitpython module, I am writing python script to check git diff --> git add of all modified files one by one. At the end I want to commit all these changes, but I didn't find the exact ...
10
votes
1
answer
9k
views
GitPython: How can I access the contents of a file in a commit in GitPython
I am new to GitPython and I am trying to get the content of a file within a commit. I am able to get each file from a specific commit, but I am getting an error each time I run the command. Now, I ...
1
vote
0
answers
386
views
use GitPython on remote machine
Using GitPython locally is peace of cake, I need clone, pull, commit git repository on remote machine.
I know I can wrap bash/git commands with paramiko, but I need find out if there is any way to do ...
0
votes
1
answer
517
views
How to get the unique part of a ref ID with GitPython?
GitPython allows me to work on Git working copies. I'd like to use it. But how would I fetch the unique part, i.e. the "abbreviated ref ID", using GitPython?
So I am interested in what the --abbrev-...
3
votes
1
answer
1k
views
GitPython: Determine files that were deleted in a specific commit
Using gitpython, I am trying to get a list of changed paths; that is, of all the added, changed and deleted files.
I can retrieve the changed and added files from the commit:
checkout commit 'X'
...