LoginSignup
45
48

More than 5 years have passed since last update.

Githubを使わずにチームでGitを共有する方法

Posted at

通常、ローカルでgitリポジトリを作成するには、

  • git init
  • git clone

のいずれかのコマンドを叩く。

リモート用のgitディレクトリを作成するには、下記を叩けば良い。

git init --bare --shared /path/to/hogehoge.git
  • --bare:ベアレポジトリ(作業ファイルを持たず、管理のみ行うリポジトリ)を作成するオプション
  • --shared:グループアクセス可能なパーミッションを追加するオプション
  • リモート用のリポジトリ(ベアリポジトリ)の拡張子は.gitとするのが慣例

AWSなど、チームでアクセスできるサーバ上で上記ディレクトリを作成すれば、Githubの代わりとして使える。
ローカルにSourceTreeのアプリも入れておくと便利!(ツリー構造がひと目で分かる)

※参考URL
▼ベアリポジトリについて - Git
http://www.proton.jp/main/programming/git/bare.html

45
48
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
45
48