git export from github remote repository

前端 未结 10 1305
北恋
北恋 2020-12-07 13:50

I\'d like to export from github remote repository, not cloning it. Similar to svn export, I do not want to get .git folder with it. I can work around it by cloning and remov

10条回答
  •  情歌与酒
    2020-12-07 14:47

    One way to achieve this is to use the SVN support offered by GIT.

    Steps to perform as root one off are (for Cent os);

    yum install git
    
    yum install subversion
    

    Then to do a selective export the following syntax should be used:

    svn export  /   --no-auth-cache --force --username 
    

    If you do not use parameter --no-auth-cache when prompted to save the password type "no" for security reasons, or it will be saved unencrypted.

    When translating from the GIT notation to the SVN notation the following mapping applies; replace "tree/master" with "trunk" for master replace "tree/branch_name" with "branches/branch_name" for branches

    This works for both files and directories.

提交回复
热议问题