LoginSignup
0
0

More than 1 year has passed since last update.

git 基本<リモートでの作業用>

Posted at

Gitを使用したリモート(チーム開発)を進める時に使用するコマンドなど

1.git fetch <リモート名>
→リモートリポジトリからローカルリポジトリに内容を反映させる
→あくまでもローカルリポジトリ内
→ローカルのワークツリーには反映させない

2.git merge
→フェッチしてきたファイルなどを、ローカルのワークツリーに反映させる

3.git pull
→フェッチしてから、マージまでを行うコマンド

マージとブランチを使いこなそう

1.新たにブランチを作成してみる

git branch <ファイル名>
→新たにbranchを作成する

git branch
→現在あるブランチを表示する

2.作成したブランチに移動してみる

git checkout <ブランチ名>
→HEADを切り替える(ブランチを変更する)
→ブランチを変更することで、作業を並行して行える

3.マージをしてみる

git merge <ブランチ名>
→ブランチないに新たに変更分を取り込んでくれる

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