Git コマンド - Himeyama/himeyama GitHub Wiki
バージョン確認
git --version初期化
git initユーザー名の設定
git config user.name "NAME"リポジトリの状況を確認
git status
data.txtをステージング
git add data.txt変更があったファイルをすべてステージング
git add -A
# カレントディレクトリー以下に限定する場合は
# git add .コミット
git commit -m 'MESSAGE'リポジトリの状況を短く
git status --shortステージングとコミットを一括で行う ただし、初回のみステージング (
git add) が必要
git commit -a -m 'MESSAGE'変更履歴を見る
git log
git statusについて調べる
git status -help実行可能なコマンドをすべて表示する
git help --all
hello-worldブランチの作成
git branch hello-worldブランチ一覧を表示
git branch
hello-worldブランチへ切り替え
git checkout hello-world
hello-worldブランチの作成と切り替え
git checkout -b hello-worldリモートブランチの削除
git push --delete origin <ブランチ名>空のブランチの作成
git checkout --orphan <ブランチ名>以下参照されたい。