All Questions
5 questions
3
votes
1
answer
554
views
How to fetch an orphaned commit?
tl;dr: I have a repository cloned but cannot see an orphaned commit locally. How can I get that commit if it did not come with the repo?
Details:
I am trying to get the contents of a specific file on ...
1
vote
0
answers
970
views
How get source code of files in a commit with GitPython?
I need to get source codes for all files in a commit. Currently I am using Pydriller and it works well. But for performance reasons I need to use GitPython.
I have tried this solution:
repo = Repo('...
6
votes
3
answers
4k
views
Iterate commits b/w 2 specified commits in GitPython
import git
repo = git.Repo(repo_dir)
ref_name = 'master'
for commit in repo.iter_commits(rev=ref_name):
<some code here>
This code iterates through all the commits. I want to iterate b/w 2 ...
1
vote
0
answers
807
views
GitPython - git add - error - file not recognised
I am facing problems when trying to add a specific filename to a commit. I can get it working via --all or u=True etc. but when I state the specific name within the command, it gives me the following ...
3
votes
2
answers
4k
views
Get tags of a commit
Given an object of GitPython Commit, how can I get the tags related to this commit?
I'd enjoy having something like:
next(repo.iter_commits()).tags