Basic Git Commands
Some basic git commands used in the git explanation videos of HackYourFuture: X and X
$ git init
Create a repository
$ git add <filename or .>
To add files to a new commit
$ git commit -m "<your commit message>"
Commit the added files
$ git checkout -- <filename>
Resets a file to how it was in the last commit
$ git log
Shows all commits
$ git log -p
Shows all commits and the content of the files
$ git push
Uploads commits to an remote/online repository
$ git pull
Downloads commits from a ‘remote’/online repository
$ git clone <git url copied from Github>
Download an existing online repository to your PC