Basic to intermediate Git and GitHub tutorial. Refer:

Cheatsheet: https://education.github.com/git-cheat-sheet-education.pdf

Git and GitHub alllows us to maintain the history of a project. Git is the version control system.

Initialize an empty git repo

git init

This will create the hidden .git folder in your project.

These are the files and folders in the .git folder:

Screenshot 2023-01-02 at 10.59.14 AM.png

NOTE: blue ones are folders and white ones are files.

How to know what changes are in the project which are not yet commited?

If I create a file names.txt in the folder and do:

git status

It will give:

Screenshot 2023-01-02 at 11.02.30 AM.png

Putting files in the staging area

To add files to a git repo do:

git add .

This is to add all files

git add <FILE_NAME>