git-command

Thumbnail of post image 043

git switchコマンドとは git switchコマンドはブランチの切り替えを専用に行うコマンドでバージョン2.23でリリースされました。 git switchコマンドがリリースされるまではgit のブランチの切り替えにはchecko ...

2020年8月8日git-command

Thumbnail of post image 146

git revert コマンド概要 git revertは特定のcommitの内容を取り消したい場合に、逆向きの変更を加えたcommitを作成するコマンドです。 commitを取り消すコマンドには他にgit resetコマンドがありますが、 ...

2020年4月28日git-command

Thumbnail of post image 121

git push コマンド概要 git pushはlocal-repository(ローカルリポジトリ)のブランチが示すcommitをremoto-repository(リモートリポジトリ)に反映するコマンドです。 また、remo ...

2020年4月28日git-command

Thumbnail of post image 114

git pull コマンド概要 git pullはremoto-repository(リモートリポジトリ)のデフォルトブランチが示すcommitから遡って取得したcommitをlocal-repository(ローカルリポジトリ) ...

2020年4月27日git-command

Thumbnail of post image 021

git fetch コマンド概要 git fetchはremoto-repository(リモートリポジトリ)のデフォルトブランチが示すcommitから遡って取得したcommitをlocal-repository(ローカルリポジト ...

2020年4月27日git-command

Thumbnail of post image 111

git reset コマンド概要 git cloneは以下の3つの処理を行うコマンドです。 remoto-repository(リモートリポジトリ)のcommitツリーを元にlocal-repository(ローカルリポジトリ)を ...

2020年4月27日git-command

Thumbnail of post image 087

git reset コマンド概要 git resetは以下の3つの処理を行うもので、指定するオプション(soft/mixed/hard)によって処理される内容が変わります。 処理内容softmixedhardHEADの位置を変更○ ...

2020年4月26日git-command

Thumbnail of post image 129

git checkout コマンド概要 git checkoutコマンドの基本的な使い方は、指定したcommitのディレクトリ(treeオブジェクト)およびファイル(blobオブジェクト)をstaging-area(ステージングエ ...

2020年4月22日git-command

Thumbnail of post image 116

git stash コマンド概要 stashとはcommitを作成する前の変更内容を一時保存するコマンドです。 stashのリスト表示 git stash list 作成したstashを一覧で表示します。 (master) $ git st ...

2020年4月15日git-command

Thumbnail of post image 028

git tag コマンド概要 タグ(tag)とは特定のcommitに名前を付けたものです。 リリースのタイミングで付与するなどの利用方法があります。 git tagはタグに対して以下の操作をするコマンドです。 タグ(tag)の表示 ...

2020年4月13日git-command

Thumbnail of post image 112

git branch コマンド概要 git branchはローカルリポジトリのブランチに対して以下の操作をするコマンドです。 ブランチのリスト表示ブランチの作成ブランチの削除upstream(上流ブランチ)の設定upstream( ...

2020年4月12日git-command

Thumbnail of post image 019

git cat-file コマンド概要 git cat-fileはリポジトリに登録されている以下のオブジェクトの内容を表示するコマンドです。 commitオブジェクトtreeオブジェクトblobオブジェクトtagオブジェクト 以下 ...

2020年4月6日git-command

Thumbnail of post image 174

git cherry-pick コマンド概要 git cherry-pick コマンドは特定のcommitの変更内容だけを取り込んで新しいcommitを作成します。 以下の図はmasterブランチでcommit(C)をc ...

2020年4月6日git-command

Thumbnail of post image 046

git rebase コマンド概要 git rebase コマンドには以下の2つの機能があります。 2つのcommitの履歴を一直線にする複数のcommitを1つのcommitにまとめる 共通していることは、commit ...

2020年4月5日git-command

Thumbnail of post image 192

git merge コマンド概要 git merge コマンドはcheckout中のブランチに対して、指定したブランチの内容を取り込み新しいcommitを作成します。 以下は、masterブランチにdevelopブランチ ...

2020年4月5日git-command

Thumbnail of post image 016

git commit コマンド概要 git commit コマンドは次の2つのオブジェクトを作成しリポジトリに登録するコマンドです。 treeオブジェクト:ディレクトリの情報commitオブジェクト:blobオブジェクト ...

2020年4月4日git-command

Thumbnail of post image 006

git rm コマンド概要 git rm コマンドは以下の2つの処理を行います。 1. staging-area(ステージングエリア)のインデックスに登録されたファイル情報を削除する2. working-director ...

2020年4月4日git-command

Thumbnail of post image 123

git ls-files コマンド概要 git ls-filesコマンドはstaging-area(ステージングエリア)でインデックスされているファイルを確認したい場合に利用するコマンドです。 ディレクトリパスを含むファイルパスの一覧を表示 ...

2020年3月30日git-command

Thumbnail of post image 112

git add コマンド概要 git addを簡単に説明すると「ステージングエリア(インデックス)に追加する」となるのですが、もう少し具体的に理解しておくと、その他のコマンドについても理解が進みやすくなります。 git addは以下の2つの ...