GoogleDriveでgitのリモート
Bare repository(管理用のファイルのみ)を作って、GoogleDrive に保存する
Bare repository の作成
--bare オプションを付ければ作業用のファイルが含まれない
リモート用のリポジトリ(ベアリポジトリ)の拡張子は.gitとするのが慣例
新規作成
$ mkdir newrepo.git
$ cd newrepo.git/
$ git init --bare
既存リポジトリから作成
$ git clone --bare somerepo newrepo.git
receive-packを有効にする
ベアリポジトリに対してpushできるようにするために,receive-packとよばれる設定を有効にします
$ cd somerepo.git/
$ git config http.receivepack true
GoogleDrive のインストール
Google ドライブをダウンロード
GoogleDrive のデータをPCのフォルダと同期させる
ローカルデータから git clone
$ git clone E:\GoogleDrive\newrepo.git mygitdir※ E:\GoogleDrive にマイドライブの内容を同期
同期先のフォルダはアカウントの接続時に設定する為、変更する場合は一度アカウントの接続を解除する必要がある