Skip to main content

All Questions

Tagged with
0 votes
1 answer
160 views

Retrieving SHA from gitpython when User is not Owner of Cloned Repo on Windows 11?

I am using the gitpython library to obtain the SHA of Python code during execution on a Windows 11 Enterprise PC. It works fine when I do it as I cloned the repo. When another user tries to run the ...
Bobby's user avatar
  • 23
0 votes
1 answer
180 views

How to save the results of git show as an excel file

I want to save a certain version of the excel file using python I have used git show to get the content of this excel git show 17ed4f74:xxx.xlsx output: how to save it as an .xlsx file
Veasky's user avatar
  • 45
8 votes
4 answers
10k views

How to remove git repository, in python, on windows

As the title describes, I need to remove a git repository by using python. I've seen other questions about this very same topic, but none of the solutions seem to work for me. My work: I need to ...
Kuratorn's user avatar
  • 315
3 votes
3 answers
5k views

Can't create / add a new branch to a git repo with gitpython

I've been working on some Python scripts which make use of the gitpython library to automate the creation of local branches based on issues in our redmine instance. To get started I'm trying to create ...
Jon Cage's user avatar
  • 37.6k
3 votes
1 answer
376 views

How do I delete a temp directory on Windows after using gitpython?

I have the following Python function, which I am running on Windows 7: def update(): temp_dir = tempfile.mkdtemp() git.Git().clone('my_repo', temp_dir) try: repo = git.Repo(...
Chris B.'s user avatar
  • 90.5k
3 votes
4 answers
6k views

gitpython error when checking if repo is dirty

I receive an error while trying to use gitpython to check if a repository is dirty, i.e. has uncommitted changed to tracked files: import git repo = git.Repo('') print repo.is_dirty() The error: ...
Jonathan Livni's user avatar