Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: add git tree #199

Closed
mkurnikov opened this issue Mar 8, 2016 · 1 comment
Closed

Feature request: add git tree #199

mkurnikov opened this issue Mar 8, 2016 · 1 comment

Comments

@mkurnikov
Copy link

As far as I understand, most of the commands here are sort of an aliases with a little bit of additional processing.

If that so, could you add an alias git tree = git log --oneline --graph --decorate --all? Or something like that, for commit tree pretty-printing.

@weakish
Copy link
Collaborator

weakish commented Jul 13, 2017

with a little bit of additional processing

the git tree can be defined via git alias, since it does not require additional processing

legit undo does not require additional processing,
it is just git reset HEAD^.
So if there is legit undo, why cannot there be git tree?

The problem is while most will agree plain git log often wastes some screen space,
I am not sure what info will be put in an alternative git log.

git log --oneline --graph --decorate --all

is concise for one-person project.
But for projects with multiple contributors,
it does not contain the info of who & when.

Personally I have a similar alias in my ~/.gitconfig for one-line commits,
but I also have another alias in which every commit occupies two lines,

# inspired by github commits page
github = %Creset%<|(54)%s %Cblue%h%Creset %Cgreen%G?%Creset %n    %C(yellow)(%an)%Creset %Cred%ar%Creset %C(cyan)%>>|(63)%D%Creset
commits = log --graph --pretty=github

Besides who and when, this also shows if the commit is gpg-signed,
for some projects this info may be unnecessary.

I think because git tree is
both easy to add via an alias
and involving personal choices for display style,
legit may not be the right place to add that command.

@weakish weakish closed this as completed Jul 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants