Using git to get just the latest revision

Using git to get just the latest revision

Asked on January 8, 2019 in Git.
Add Comment


  • 2 Answer(s)

    Try this –depth option in git clone:

    Create a empty clone with a history shorten  to the specified number of commits.

    Instance : git clone –depth=1 <remote_repo_url>

     

    Answered on January 8, 2019.
    Add Comment

    Git clone –depth=1 <URL>to use –remote option of git archive:

    $ git archive --format=tar --remote=<repository URL> HEAD | tar xf -
    

    By using some web interface like gitweb or GitHub.

    Answered on January 8, 2019.
    Add Comment


  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.