Git clone --no-checkout again

后端 未结 1 1105
甜味超标
甜味超标 2021-02-06 03:56

I don\'t want to waste space on my machine and I only want to see the history of repository (for each branch). That\'s why, I did a:

    git clone --no-checkout
         


        
相关标签:
1条回答
  • 2021-02-06 04:24

    Use --bare option for git clone

    Update:

    after the cloning is completed make sure that the section remote.origin in the configuration (see config file in the repo) contains fetch key with an appropriate. The section should look like this:

    [remote "origin"]
        url = <upstream repo remote address>
        fetch = +refs/heads/*:refs/remotes/origin/*
    

    Then you may update the repo from time to time by issuing git fetch inside the repo.

    0 讨论(0)
提交回复
热议问题