HiroIshida
HiroIshida

Reputation: 1603

How to hide remote branches without deleting them from remote

How to hide remote branches without deleting it? I often display the whole tree of commits by

 git log --graph --oneline --all

This currently display all the remote branches...

Upvotes: 3

Views: 592

Answers (2)

j6t
j6t

Reputation: 13507

You can use

git log --graph --oneline --tags --branches

Add HEAD if you are on a detached head.

The options --tags, --branches, --remotes are quite versatile when combined with --exclude. For example, I have many branches named wip/foo, wip/bar that contain work in progress. I commonly use

gitk --exclude=wip/* --branches ^master

to see all branches that are not yet merged into master, but without cluttering the list with work-in-progress.

Upvotes: 0

Greg Hewgill
Greg Hewgill

Reputation: 993861

You can do this using the --exclude option:

git log --graph --oneline --exclude=refs/remotes/* --all

Note that the --exclude option must appear before the --all option. See the git log documentation for further information.

Upvotes: 6

Related Questions