Skip to main content

All Questions

Tagged with
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....
Gargee Suresh's user avatar
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 ...
Haibrayn González's user avatar
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 ...
TreeWater's user avatar
  • 867
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 ...
Caffeine's user avatar
  • 455
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 ...
Tyler R's user avatar
  • 504
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 ...
SunilThorat's user avatar
  • 1,748
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-...
0xC0000022L's user avatar
  • 21.1k
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' ...
Wilbert's user avatar
  • 7,439