Git

Git is a free and open source version control system used to handle small to very large projects efficiently. Git is used to track changes in the source code, enabling multiple developers to work together.

Basic Git Commands

git clone <repo>

Copies master branch of a project from a git repository to local machine.

git checkout -b <branch_name>

Create a branch on local machine to work on and moves to it.

git status

See what files have changed.

git add <filename>

Add file to commit.

git commit -m “<commit_message”>

Send a descriptive message about changes you are commiting.

git push origin <branch_name>

Sends copy of branch from local machine to a git repository.

git checkout master

Moves you to master branch.

git pull origin master

Updates the branch you are on to the latest in git repository.