You are on page 1of 1

Git Instructions

Commands for setting up your username and email:


● git config --global user.name "username"
● git config --global user.email "youremail@something.com"

Commands for regular workflow:


● git status
● git add .
● git status
● git commit -m “write a proper & meaningful commit message”
● git status
● git log
● git pull origin “name of the parent branch”
● git push -u origin “name of your branch”
● git status

Commands for git branch:


● git branch -a (Lists all the available branches)
● git switch “branch name” (Use this command to go to the branch
that you are assigned to work on)

*** IMPORTANT ***


*** Always maintain the following 3 steps ***

1. git commit -m “proper & meaningful message”


2. git pull origin “name of the parent branch” (If everything is
okay, only then go to step 3)
3. git push -u origin “name of your branch”

N.B. - Revise git commands whenever you are working on a project


that is maintained by git

You might also like