Git is a distributed version-control system for tracking changes in source code during software development. It is designed for coordinating work among programmers, but it can be used to track changes in any set of files
Having trouble understanding the difference between git and git hub? Worry not we've all been there. Github is the online version of git, you can upload your code to it, store it there, share it with other great programmers who can view your code.
Download git from the official site here!
https://git-scm.com/downloadsInstall it on your machine.
Open command prompt in Windows.
Go to a folder you want to track with git.
And type command "git init" to initialze it.
(Execute them in the sequence they are written)
git init
This is the first of all commands, you have to make the folder a git repo first in order to track it.
git status
This command shows status for your folder.
git add .
In order to save our files on git we first need to add them to the staging area.
git commit -m "Message"
This command commits all the changes to the repo, we can add a message by using -m. git add . is pre-requisite of this command.
git log --oneline
This shows log containing data and id of all the commits made to this repo.
git checkout id filename
We get id from git log --oneline and use it here, we then specify the filename we want to revert and its done.