git importing-a-new-project

CommandNew filesChanged filesDeleted files
Alice/> mkdir foo bar baz
snap no: 1
Alice/> echo one > foo/one.txt
snap no: 2
Alice/> echo two > foo/two.txt
snap no: 3
Alice/> echo three > bar/three.txt
snap no: 4
Alice/> echo four > baz/four.txt
snap no: 5
Alice/> git init
Initialized empty Git repository in /home/rene/github/github/git-internals/repos/importing-a-new-project/Alice/.git/
snap no: 6

Tell git to take a snapshot of the contents of all files under the working directory:

Alice/> git add .
snap no: 7

The snapshot is now stored in a temporary staging area which Git calls the index.

Permanently store the »first version« of the project in Git:

Alice/> git commit -m "First version"
[master (root-commit) 96a476f] First version
 4 files changed, 4 insertions(+)
 create mode 100644 bar/three.txt
 create mode 100644 baz/four.txt
 create mode 100644 foo/one.txt
 create mode 100644 foo/two.txt
snap no: 8