Git Commands

My Commonly-Used Git Commands

Shortcut Description
git status Show whether the local checkout is in sync with the remote.
git pull Get latest changes from the repo.
git add Add the changed file to the commit
git push Make a local commit.
git push remote Make a remote commit
git ls-tree –full-tree -r HEAD Show files in repo.
git reset Undo changes (Documentation).
git reset ~HEAD Reset to last checkout.
git diff branch1..branch2 Diff branches.
git diff ..branch2 Diff current branch to branch2.