Git: Basic (init, add, remove, commit)

1. Git init

$ git init

image.png

2. Working on projects

image.png

3. Check the status

$ git status

image.png

4. Add files

$ git add index.html // add index.html file

$ git add *.js // all files ends with .js

$ git . // all files

image.png

You can see the files is moved to the staging area

5. Remove file from the staging area

$ git rm --cached style.css

image.png

6. commit

$ git commit -m "message"

image.png