LoginSignup
0
0

More than 5 years have passed since last update.

既存の作業ディレクトリから共有のgitリポジトリを作る手順

Posted at

何度かググってしまったのでこちらにメモとして残しておきます。

手順

  1. 既存の作業ディレクトリ(hoge)でgit init, git add ., git commit
  2. リポジトリにしたいディレクトリを作成(ここでは仮にhoge.git)
  3. hoge.gitでgit init --bare --shared
  4. hogeでgit remote add origin hoge.git
  5. hogeでgit push origin master
  6. 【確認】git clone path/to/hoge.git hoge2
  7. 【確認】hoge2にhogeの内容があればOK
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0