Basic Git Commands
To initialize a project as a Master
—
git init
Current status of the folder
—
git status
add file to the staging area in the repository —
git add .
commit the changes to the git repository —
git commit -m"comment here"
see a brief log of commits —
git log --oneline
checkout the file from an older commit —
git checkout <commit> <file>
Unstage a staged file, but leave working directory unchanged —
git reset HEAD <file>
reset the staging area to the last commit without disturbing the working directory —
git reset