1. Installation
install
apt-get install git
2. Preparation
Setting up name and e-mail address
git config --global user.name "Your Name"
git config --global user.email "email@foo.com"
3. Create repo
Create a repository
git init
4. Create a “HelloWorld” file
Hello world!
mkdir HelloWorld
touch HelloWorld/hello
5. Add HelloWorld
Add file
git add HelloWorld
git commit -m "Hello World!"
You’d better not do that
|
6. Check Status
Check status
git status
7. Show
7.1. Show history
git log
git log
7.2. Show config
git config
git config --list
8. Git workflow
Git workflow
touch HelloWorld/hello1
git status
git add HelloWorld
git status
git commit -m "Hello "
git status