GIT clone to external drive for backup

前端 未结 6 769
忘掉有多难
忘掉有多难 2020-12-23 15:13

We have GIT set up within our windows network (using msysgit & GitExtensions). We each have our own repositories and we push to a remote \'bare\' repository on one of o

6条回答
  •  情歌与酒
    2020-12-23 15:30

    Sorry, I can't comment posts, but I was thinking too about copying the .git, but what happens if the .git is copyed during a pull ?

    Anyway, why copying the whole stuff as you could fetch the deltas from time to time ?

    Initialization of backup : (in F:\GitClone\Repo1 empty)

    git init
    git add remote origin /c/GIT/Repo1
    

    Then your "delta backup script" would just do :

    cd /f/GitClone/Repo1
    git fetch origin
    

提交回复
热议问题