tsubasa:~$ mcd tmp/git
tsubasa:~/tmp/git$ git init
Initialized empty Git repository in /home/isbear/tmp/git/.git/
tsubasa:~/tmp/git$ mkdir -p a/b
tsubasa:~/tmp/git$ touch a/a.png
tsubasa:~/tmp/git$ touch b.png
tsubasa:~/tmp/git$ touch a/b/c.png
tsubasa:~/tmp/git$ touch a/a.html
tsubasa:~/tmp/git$ touch a/b/c.html
tsubasa:~/tmp/git$ cat >.gitignore
*~
*.png
*.jpg
tsubasa:~/tmp/git$ git status
# On branch master
#
# Initial commit
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# .gitignore
# a/
nothing added to commit but untracked files present (use "git add" to track)
tsubasa:~/tmp/git$ git add a
tsubasa:~/tmp/git$ git status
# On branch master
#
# Initial commit
#
# Changes to be committed:
# (use "git rm --cached <file>..." to unstage)
#
# new file: a/a.html
# new file: a/b/c.html
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# .gitignore
tsubasa:~/tmp/git$ git commit -m 'initial commit'
[master (root-commit) e0baae1] initial commit
0 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 a/a.html
create mode 100644 a/b/c.html
tsubasa:~/tmp/git$ echo 'hello' >> a/a.html
tsubasa:~/tmp/git$ git status
# On branch master
# 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: a/a.html
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# .gitignore
no changes added to commit (use "git add" and/or "git commit -a")
tsubasa:~/tmp/git$ git add a
tsubasa:~/tmp/git$ git status
# On branch master
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# modified: a/a.html
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# .gitignore