Git

導入

Git - Downloads

Windows版はDownload for Windowsに、インストーラ版とポータブル版があります。

基本

プロジェクトの取得と作成
コマンド 機能
クローン (clone) 新しいディレクトリへリポジトリを複製
Git - git-clone Documentation
スナップショット
コマンド 機能
追加 (add) ファイルをインデックス (ステージ:stage) に追加。指定のファイルだけをコミットできる
Git - git-add Documentation Git - 対話的なステージング
コミット (commit) ローカル リポジトリに変更を記録
Git - git-commit Documentation
ブランチとマージ
コマンド 機能
ブランチ (branch) ブランチの一覧、生成、削除
Git - git-branch Documentation
チェックアウト (checkout) ブランチの切り替え
Git - git-checkout Documentation
リセット (reset) 現在のHEADを、指定の状態へリセット
Git - git-reset Documentation Git - リセットコマンド詳説
マージ (merge) 2つ以上の開発履歴を結合
Git - git-merge Documentation マージの基本 - Git - ブランチとマージの基本
スタッシュ (stash) 作業ディレクトリに変更を隠す (stash)。ブランチを切り替える前に、作業途中の状態をスタック (stack) に保存できる
Git - git-stash Documentation Git - 作業の隠しかたと消しかた
共有とプロジェクトの更新
コマンド 機能
プッシュ (push) ローカル リポジトリで、リモート リポジトリを更新
Git - git-push Documentation
プル (pull) リモート リポジトリから更新部分を取り込み、現在のブランチへマージ
Git - git-pull Documentation
フェッチ (fetch) 他のリポジトリからデータをダウンロード
Git - git-fetch Documentation
補修
コマンド 機能
チェリーピック (cherry-pick) 他のブランチのコミットを、現在のブランチへマージ
Git - git-cherry-pick Documentation
リベース (rebase) 現在のブランチの変更を、他のブランチの先頭に適用
Git - git-rebase Documentation Git - リベース
  (revert) 既存のコミットを、元に戻す
revert - Git - git-revert Documentation

コミット (commit)

 

ファイルの無視

.gitignoreに記述します。

この指定はすでに追跡されているファイルに対しては効果なく、そのようなファイルには先にgit rm --cachedとします。Git - gitignore Documentation

GitHub

Gitのリポジトリをホスティングするサービスです。

How people build software · GitHub

複数の技術系サイトから、まとめて検索