git : Setup git remote on local drive

来源:互联网 发布:中小学生网络问卷调查 编辑:程序博客网 时间:2024/05/16 04:56

Setup git remote on the local drive

For example, my working folder is

C:\JZprograms

And I want to backup in

D:\reposituar

We can follow following steps to set up git remote

(1)   In D:\reposituar

$git --bare init

(2)   In C:\JZprograms

$git remote add jzbackupD:\reposituar

$ git config remote. jzbackup.mirrortrue

$ git push jzbackup

Notice that --bare will only backup git, it is better to use git init which will back up all the files.  

ref: 

http://stackoverflow.com/questions/1887364/git-clone-to-external-drive-for-backup

0 0
原创粉丝点击