Basic Useful Git Commands By Deepankar Varma git init -> Create a new local repo git diff -> Show changes not yet staged git status -> List new or unmodified files git add . -> Stage all changed files git add -> Stage a file git commit -a -> Commit all local changes in tracked files git commit -> Commit previously staged changes git commit --ammend -> Change the last commit git log -> Show full change history git checkout -> Switch to a branch and update working directory git branch -> Create a new branch git branch -d -> Delete a branch git fetch -> Fetches all branches from remote repo git pull -> Fetch remote version of a branch and update local branch git push -> Push the committed changes to a remote repository git merge -> Merge the specified branch into the current branch git rebase -> Rebase your current HEAD onto the specified branch git revert -> Creates a new commit to revert the specified commit