Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Exclude remotes in git log --all?

Tags:

git

I want to inspect all commits in the main namespace (i.e. refs/heads/*) via git log, that is, to exclude refs/remotes, refs/original, etc. Is there a simple command to achieve this?

like image 737
Danny Lin Avatar asked Oct 18 '13 01:10

Danny Lin


People also ask

What does-- decorate do in git log?

The --decorate flag makes git log display all of the references (e.g., branches, tags, etc) that point to each commit. This lets you know that the top commit is also checked out (denoted by HEAD ) and that it is also the tip of the main branch.

Does git log show all branches?

Graph all git branches Developers can see all branches in the graph with the –all switch. Also, in most situations, the –decorate switch will provide all the supplemental information in a formatted and nicely color-coded way.

What is git log -- all?

To show all of the branches, add --all to your git log command. So basically, without --all you only see the commits that actually make up your current branch.

How to understand git log?

The git log command shows a list of all the commits made to a repository. You can see the hash of each Git commit, the message associated with each commit, and more metadata. This command is useful for displaying the history of a repository.


1 Answers

Try this:

git log --all --not --remotes=*
like image 166
Sunlis Avatar answered Sep 24 '22 09:09

Sunlis