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

changing the alias for git visual from gitk #1702

Open
nyck33 opened this issue Aug 23, 2021 · 4 comments
Open

changing the alias for git visual from gitk #1702

nyck33 opened this issue Aug 23, 2021 · 4 comments

Comments

@nyck33
Copy link

nyck33 commented Aug 23, 2021

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
Copy link
Contributor

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
Copy link
Member

ben commented Aug 26, 2021

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
Copy link

#1702

@zaczac1314
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants