Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Git Clone to not empty directory #1496

Answered by Byron
ryanmerolle asked this question in Q&A
Discussion options

Hello,

Thanks for this package!

Instead of a traceback resulting, how would I notify the user for a non-empty directory when cloning a repo using the package? Or would I just do better to check the directory first without gitpython?

Thanks!

You must be logged in to vote

Or would I just do better to check the directory first without gitpython?

It should be possible to catch the exception as well if it's unique enough. Both will work, none is optimal, but that's something we'd have to live with.

Replies: 1 comment 1 reply

Comment options

Or would I just do better to check the directory first without gitpython?

It should be possible to catch the exception as well if it's unique enough. Both will work, none is optimal, but that's something we'd have to live with.

You must be logged in to vote
1 reply
Comment options

I approached it by checking if the directory existed before I handed off to GitPython.

Thanks!

Answer selected by ryanmerolle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /