0
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.

git まとめ

0
Posted at

目次

①gitのインストールと準備
②ディレクトリをgitで管理する準備
③gitコマンド各種の説明

①gitのインストールと準備

git config --global user.name "設定したいユーザー名を入力する"
git config --global user.email "設定したいメールアドレス名を入力する"

②ディレクトリをgitで管理する準備

アプリケーションのディレクトリでターミナルで
git init 
をする。 

③gitコマンド各種の説明

・git status
変更されたファイルを確認することができるコマンド。

・git add -A
リポジトリ内に変更のあったファイル全てをステージング・エリアに移動するコマンド。
この時点では保存(コミット)されてはおらず、一時待機用のリポジトリに置かれているということを覚えておく。

・git commmit -m "メッセージ内容"
ステージングにある内容をローカルリポジトリに保存反映(コミット)するコマンド。

・git push
git push origin [ブランチ名]で特定のブランチをリモートブランチへpushするコマンド。

・git checkout
git checkout -b [トピックブランチ名]でトピックブランチが生成されると同時に、
現在いるブランチが作成したブランチに切り替わる。

git checkout <ブランチ名>で特定のブランチに移動ができる

・git merge
現在チェックアウトしているブランチに対して、別のコミットが持っている変更内容を
統合するためのコマンド。

・git pull
特定のリモートブランチの変更をローカルのカレントブランチへ反映するコマンド。

◯参考記事
https://qiita.com/gold-kou/items/7f6a3b46e2781b0dd4a0

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?