Git Command CHEATSHEET

Detailed Git documentation for reference is available here

Making a repositry a git repositry

git init

Checking the status of files and notifying if any changed files should be added for tracking

git status

Adding files for tracking for commit

git add file
git add someProgram.java

Add all files of a certain filetype:
git add *.filetype
Example: git add *.java

Commiting the files being tracked

git commit -m "Message describing the files and changes in current commit"

Viewing the Commit History

git log

Creating a branch for writing code without messing with main code

git branch createCertainFeatureName

Move between branches and main branch and commits

Working with a remote repositry

If the remote repositry is ahead of local repositry, do:
git pull

Then, we have to commit intended changes before we can do:
git push