1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

GitHubでチーム開発を行うためのgit clone ~ git pushまでの流れ

Posted at

git clone ~ git pushまでの流れについて

前提

・githubの登録済み
・ターミナルにgithubの設定を反映させてる(user.name,user.email)
・公開鍵の作成済み

git clone

git cloneしたいgithubのリポジトリを開く。
そして右上の緑のボタンからURLをコピーする。
スクリーンショット 2019-09-08 22.46.14.png

ターミナルのでgit cloneする

git clone [URL]

Cloning into 'リポジトリ名'...
remote: Counting objects: 7, done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 7 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (7/7), done.
Checking connectivity... done.

成功すると上記のような表示になる。
成功したかどうかは、ターミナルでそのままlsコマンドでcloneしたかったファイルがあるか確認可能。

$ ls

git add . & git commit -m hogehogeで変更を加える

(例)README.mdファイルの場合
1.ファイル内の変更をする。

README.md
接続テストです

このように変更を加えたとする。

2.README.mdファイルをaddする

git add -A

3.README.mdファイルをコミットする

git commit -m "接続テスト"

4.adminユーザーの方でチーム開発メンバーの招待をする
このままgit pushしてもエラーがでるのでリポジトリを作成したユーザーの方から、チームメンバーの登録行う
スクリーンショット 2019-09-09 14.03.55.png
Serach by usernameの所に参加するメンバーのusernameを検索すると招待メール送れるので、そこで承認をしてもらう。

README.mdファイルをプッシュする

メンバーの承認も終わったら最後pushして完了

git push 

Counting objects: 3, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 327 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To [URL]
   c836616..0731f24  master -> master
1
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
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?