progit / progit2

Pro Git 2nd Edition
Other
5.77k stars 1.9k forks source link

changing the alias for git visual from gitk #1702

Open nyck33 opened 3 years ago

nyck33 commented 3 years ago

General overview of your idea.

On page 69, the command to show the graph is introduced. git log --oneline --decorate --graph --all Rather than set alias for visual to gitk, I did: git config --global alias.visual 'log --oneline --decorate --graph --all' because it is a longer command than gitk, this command keeps everything in the terminal so it is unified in the sense that it is git visual where as gitk differs with the k appending with no space so it signals a change to GUI for me.

What problem will this solve?

New users don't have to remember a super long command and it's clearer what the intentions are.

Have you thought about other solutions?

I could set an alias in ~/.bashrc instead for any number of commands as I am on Ubuntu.

I am answering yes I want to help but if there is someone who can implement it faster than I, I'd like to tag along to learn.

Do you want to help with this enhancement idea?

Yes

HonkingGoose commented 3 years ago

We cover "Git Aliases" in chapter 2.7 so we could mention your git visual alias there: https://github.com/progit/progit2/blob/main/book/02-git-basics/sections/aliases.asc

What do you think @ben?

ben commented 3 years ago

First of all, git visual will mean different things to different people. I tend to think it's going to be a minority that would assume it to mean "a nicer-looking log in my text shell." Most readers will be expecting "visual" to mean a GUI tool. So in that sense, I don't think we should replace the git visual alias with a call to git log.

But your alias is useful! I'd definitely accept it as an example alias in that section. 😀

zaczac1314 commented 3 years ago

https://github.com/progit/progit2/issues/1702

zaczac1314 commented 3 years ago

General overview of your idea.

On page 69, the command to show the graph is introduced. git log --oneline --decorate --graph --all Rather than set alias for visual to gitk, I did: git config --global alias.visual 'log --oneline --decorate --graph --all' because it is a longer command than gitk, this command keeps everything in the terminal so it is unified in the sense that it is git visual where as gitk differs with the k appending with no space so it signals a change to GUI for me.

What problem will this solve?

New users don't have to remember a super long command and it's clearer what the intentions are.

Have you thought about other solutions?

I could set an alias in ~/.bashrc instead for any number of commands as I am on Ubuntu.

I am answering yes I want to help but if there is someone who can implement it faster than I, I'd like to tag along to learn.

Do you want to help with this enhancement idea?

Yes