GIT clone to external drive for backup

前端 未结 6 785
忘掉有多难
忘掉有多难 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:43

    You could always just schedule bash.exe mybashbackupscript.sh

    Anyway, in windows terms:

    rmdir F:\GitClone /s /q
    mkdir -p F:\GitClone\Repo1
    copy c:\GIT\Repo1\.git F:\GitClone\Repo1\.git
    

    git clone doesn't really do anything fancier than that.

    edit: as someone else pointed out, it's probably best to just make a new backup repo and just pull/fetch into that. You'll avoid any accesing issues with the .git :)

提交回复
热议问题