38. 中で起きている事
使ってみる
repository
workspace
cd
Rename a to d and delete b.
cached (index)
d
d
master←HEAD
Add a and b.
ab
$ git commit -m ’Rename a to d and delete b.’
HEAD は master へ向いているので、
結果的に新しい commit へ移動
92. 中で起きている事
branch を使用する
repository
Merge branch ’develop’
workspace
cde
master←HEAD
cached (index)
cde
Add c.
Add e.
Add e.
develop
Rename a to d and delete b.
$ git branch -d develop
develop branch を削除
(commit は消えない)
93. 中で起きている事
branch を使用する
repository
Merge branch ’develop’
workspace
cde
master←HEAD
cached (index)
cde
Add c.
Add e.
Rename a to d and delete b.
$ git branch -d develop
develop branch を削除
(commit は消えない)
128. status
レポジトリの状態を確認する
現在の cached の状態を確認
$ git status
Changes to be committed:
(use ”git reset HEAD <file>...” to unstage)
new file: f
Changes not staged for commit:
(use ”git add <file>...” to update what will be committed)
(use ”git checkout -- <file>...” to discard changes in working directory)
modified: f
Untracked files:
(use ”git add <file>...” to include in what will be committed)
g
130. status
レポジトリの状態を確認する
現在の cached の状態を確認
workspace と cached の差分
Changes not staged for commit:
(use ”git add <file>...” to update what will be committed)
(use ”git checkout -- <file>...” to discard changes in working
directory)
modified: f
132. status
レポジトリの状態を確認する
現在の cached の状態を確認
$ git add f
$ git status
Changes to be committed:
(use ”git reset HEAD <file>...” to unstage)
new file: f
Untracked files:
(use ”git add <file>...” to include in what will be committed)
g
workspace と cached の差分が無くなる
271. 最後に
$ git help -g
The common Git guides are:
attributes Defining attributes per path
glossary A Git glossary
ignore Specifies intentionally untracked files to ignore
modules Defining submodule properties
revisions Specifying revisions and ranges for Git
tutorial A tutorial introduction to Git (for version 1.5.1 or newer)
workflows An overview of recommended workflows with Git
’git help -a’ and ’git help -g’ lists available subcommands and some
concept guides. See ’git help <command>’ or ’git help
<concept>’
to read about a specific subcommand or concept.