information about files (aka blobs), their relationship to each other (the tree), the previous state (parent) and a message make up a commit
$ git cat-file -p HEAD
tree 80fc45cae348efbdbbb652642cf4c22e1ddaaf80
parent b2b3a018fa2569bc5aa54b0b744145f6758bcba7
author Denis Schluppeck <denis.schluppeck@gmail.com> 1517238320 +0000
committer Denis Schluppeck <denis.schluppeck@gmail.com> 1517238320 +0000
fixes http to https
Workflow
Let's try it
make a directory, cd into it
initialize repo
mkdir test && cdtest
git init
make a text file test.txt
write something into it and save it
Let's try it (2)
add to staging area
... and try to commit with a message (-m)
git add test.txt
git commit -m 'my first commit'
Warnings?
you'll see some warning messages
for (only this first time), set up your user.name and user.email
git config --global user.name "First Last"# your name
git config --global user.email "me@gmail.com"# your email
This info is stored on your machine in a little file, which you can inspect
more ~/.gitconfig
Now complete the commit
git status # read what's there
git commit -m 'my first commit'
git status # read what's there NOW
If you want this on github
Currently the repository is local to the machine you are working on, if you want to share with your friends and colleagues on github.com, follow instructions at: