Skip to content

Clone project without project main folder. #1083

Description

@hakanoktay

-- Hi,
-- how can i clone only files and directories? When i clone, it downloading in a folder named by project name.
/path/to/xxxxx

# Example usage
import git
git.Git(WEBDIR + domain.name + '/www').clone("https://github.com/uuu/xxxxx.git")

-- I was doing it by adding dot (.) when cloning with terminal
git clone https://github.com/uuu/xxxxx.git .
/path/to

Thank you

Activity

  1. Byron commented on Nov 13, 2020

    @Byron
    Member

    I believe this invocation sets the working dir, but doesn't provide the actual ./path/to.

    Maybe try something along the lines of git.Git(WEBDIR + domain.name + '/www').clone("https://github.com/uuu/xxxxx.git", "./path/to").

    Lastly, you can see what GitPython actually executes by using the flags described in the docs.

    Even though I am closing this question, please feel free to keep adding follow ups as comments.

  2. reopened this on Feb 26, 2021
  3. locked and limited conversation to collaborators on Feb 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions