You are on page 1of 2

Git Commands Description

git init projectName Create a new local repository


git clone repoURL Download from an existing repository
git status Give status of complete changes
git diff show the changes of unstaged files
git log Show full change history
git branch List of all local branches
git branch -av List all branches including local and remote
git checkout branchName Switch to a branch
git branch newBranchName Create a new branch
git branch d branchName Delete the branch
git add fileName Stages the file, ready for commit
git add Stage all unstaged file, ready for commit
git commit -m "comm it message"
Commit all staged files
git fetch Get the latest changes from origin but no merge
git pull Get the latest changes from origin but merge
git pull rebase Fetch the latest changes fron origin and rebase
git push Push local changes to the origin
remote

ut no merge
ut merge
and rebase

You might also like