LoginSignup
1
0

More than 3 years have passed since last update.

[WIP] Git コマンド集

Last updated at Posted at 2019-04-17

Git コマンド集

基本的な操作

     コマンド       説明
git init リポジトリの状態を初期化
git status リポジトリの状態を確認
git add ステージ領域へファイルを追加
git commit リポジトリの歴史を記録
git log コミットログを確認
git diff 変更差分を確認

ブランチの操作

     コマンド       説明
git branch ブランチを一覧表示
git checkout -b ブランチを作成し切り替える
git merge (--no-ff) ブラントをマージ (マージコミット)
git log --graph ブランチを視覚的に確認する

コミットを変更する方法

     コマンド       説明
git reset 歴史を戻る
git commit --amend コミットメッセージを修正
git rebase -i 歴史を押しつぶして改変

リモートリポジトリへの送信

     コマンド       説明
git remote add リモートリポジトリを登録
git push リモートリポジトリへ送信

リモートリポジトリから取得

     コマンド       説明
git clone リモートリポジトリを取得
git pull 最新のリモートリポジトリブランチを取得
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