Helpful Git Commands
Created: 2 April 2020 Modified:
Useful Git commands for various situations.
Create a new local branch and switch to the new branch.
Create new branch
Checkout a tag and create new branch
Push a new local branch to the origin.
Push new branch
Various ways to commit
Various Ways to Show Status
You run “git pull” and automatic merge fails. You just want to revert to the origin.
Revert local Git to origin
Remove all files not in Git. Can be used post revert to origin above to remove all non commited files.
Remove files not in Git.
List branches that are on origin but not your local Git.
List Local and Remote Branches
Delete Remote and Local Branches
Prune Branches Not in Origin
How to resolve merge conflicts
Steps to Resolve Merge Conflict
tags: linux - git