Here are a common git commands that I end up using pretty frequently. Will keep on updating this list
- List all remote branches
- Just view modified files between 2 branches (without diff)
git remote -v
Displays url of remote repo from where local git was pulled- Viewing Unpushed Git Commits
Simplest is git branch -a
Shows all remote and local branches. git branch -r
Will show all remote branches only.
Another way is to use git remote feature like:
git remote show origin
This shows all branches on remote and how they corelate with local repo.
git ls-remote
Will meticulously list all branches and tags.
git diff --name-status master..branch
Will list out only filenames git diff master..branch
without –name-status will show whole diff.
Alternatively use git remote show origin
or git config --get remote.origin.url
git log origin/master..HEAD
To view diffs: git diff origin/master..HEAD
Another way: git log @{u}..