Live data from Hacker News

Show HN: I made a tool that made me faster at Git

github.com

151–160 of 235 posts

Re: Show HN: I made a tool that made me faster at Git

#151
post #130
post #66

> are YOU tired of typing every git command directly into the terminal I'm not. Are there many people that are? Is this not just a matter of learning to use shell keybindings effectively? That and aliases does wonders to avoid repetitive typing. Many times I type `git s` (alias for `git status -s`) out of reflex when I really meant to do `ls`. When I forget to add `-a` to `git ci -m ...` (`ci` being `commit`) and get…

If you editor has a correct git support, you never need to do git status because it will show you which files had been edited since the last commit. Every time I hear people saying how much they prefer the git command line is because they never seriously tried to leverage the git features of their IDE. Vs code with git lens or intellij idea have excellent git integration. Everything is one shortcut away. The git comm…

I do a git diff after every git status before adding/committing. Do IDEs show diff before committing? Jetbrains IDEs do show diff between subsequent commits. Although they do highlight which files have been modified.

Re: Show HN: I made a tool that made me faster at Git

#152
post #66

> are YOU tired of typing every git command directly into the terminal I'm not. Are there many people that are? Is this not just a matter of learning to use shell keybindings effectively? That and aliases does wonders to avoid repetitive typing. Many times I type `git s` (alias for `git status -s`) out of reflex when I really meant to do `ls`. When I forget to add `-a` to `git ci -m ...` (`ci` being `commit`) and get…

Learning git by heart has immense value if you've got a team that doesn't grok rebasing and merging or just a cross-functional team with QA's commiting to a monorepo.

I can diagnose and fix issues for people in around 5 minutes leaving them with history that works everywhere and I don't need to jump to my workstation for reference on aliases.

Thankfully, people I work with seem to like git, except for the odd git push --force breaking branches for them.

That reminds me that I'll have to teach one QA to do rebases. His merges break our history graph in funny ways.

Re: Show HN: I made a tool that made me faster at Git

#154
post #100
post #78

Earlier quoted context omitted.

Jira doesn't have to be evil. It is intrinsically awful due to that tendency enterprise database products have of growing the flexibility to reimplement various wheels inside of them, poorly. But using it for evil depends on managerial intent. At my gig, everyone grumbles about Jira, because it sucks; see above. But, we have workflows built primarily around it with various integrations, and it works for coordinating…

> More stable than some enterprise monstrosities It must have gotten a lot of stability improvements since I stopped managing jira clusters a few years ago because, from the ops side of things, JIRA was one of our main "make a cron job that restarts tomcat every night" running jokes at multiple companies over the last decade. I've also had wonderful (/s) experience with the unicorns in Gitlab but that's another tale.

That's what you get for putting unicorns in a product.

Re: Show HN: I made a tool that made me faster at Git

#155
post #66

> are YOU tired of typing every git command directly into the terminal I'm not. Are there many people that are? Is this not just a matter of learning to use shell keybindings effectively? That and aliases does wonders to avoid repetitive typing. Many times I type `git s` (alias for `git status -s`) out of reflex when I really meant to do `ls`. When I forget to add `-a` to `git ci -m ...` (`ci` being `commit`) and get…

If you status, commit, diff often then you don't want to leave your editor, because every little things (switching to a terminal just to do git stuff) adds up in the long run. Version control functions should be available right in your editor (e.g. magit) and you can't really beat one character hotkeys for version control stuff. It doesn't get more convenient than that.

> If you status, commit, diff often then you don't want to leave your editor, because every little things (switching to a terminal just to do git stuff) adds up in the long run.

That sounds like limiting the functionality of the whole computer to what the text editor can do. That doesn't make sense. Next, you'll want to browse the web from the editor because you don't want to leave it (just because emacs does it doesn't mean it isn't absurd).

Anyway, I think it's better to configure the system so using multiple programs is as quick and effortless as possible. For your example, I use i3, a tiling window manager, and have the screen split with a terminal window on the left and my editor on the right. If I wanted to check `git status`, I just type `git s`. To go back to the editor, ``. There's really not much difference with a single character shortcut.

Re: Show HN: I made a tool that made me faster at Git

#157
post #130

Earlier quoted context omitted.

If you editor has a correct git support, you never need to do git status because it will show you which files had been edited since the last commit. Every time I hear people saying how much they prefer the git command line is because they never seriously tried to leverage the git features of their IDE. Vs code with git lens or intellij idea have excellent git integration. Everything is one shortcut away. The git comm…

In my experience of using git integration features in IntelliJ, they are nice for simple tasks like quickly checking the status of a file or committing all the changes, but as soon as I need to do more complex tasks in git, I find the UIs either get in the way and slow me down or just aren’t fully featured enough to do what I need to do and I end up back on the command line. Hence why I always encourage newcomers to…

Git integration in IntelliJ is terrible IMO. It conflates staging and committing, and unstaging with reverting. I don't use it because it is a PITA, but what is even more annoying are the PR's from team members who do use it, which I have to send immediately back due to random files.

Re: Show HN: I made a tool that made me faster at Git

#158
post #155

Earlier quoted context omitted.

If you status, commit, diff often then you don't want to leave your editor, because every little things (switching to a terminal just to do git stuff) adds up in the long run. Version control functions should be available right in your editor (e.g. magit) and you can't really beat one character hotkeys for version control stuff. It doesn't get more convenient than that.

> If you status, commit, diff often then you don't want to leave your editor, because every little things (switching to a terminal just to do git stuff) adds up in the long run. That sounds like limiting the functionality of the whole computer to what the text editor can do. That doesn't make sense. Next, you'll want to browse the web from the editor because you don't want to leave it (just because emacs does it does…

> That sounds like limiting the functionality of the whole computer to what the text editor can do.

Not really. It's about putting the most frequent features into your editor, so they can be accessed effortlessly. If you have to do something which is less frequent and the editor does not support it then you still have the terminal.

> If I wanted to check `git status`, I just type `git s`. To go back to the editor, ``. There's really not much difference with a single character shortcut.

It's efficient compared to switching to the terminal with alt-tab or something, though by single shortcut I meant that you can use it right in your editor buffer, so it's really just pressing one or two keys vs. `git s`

Re: Show HN: I made a tool that made me faster at Git

#159
post #66

> are YOU tired of typing every git command directly into the terminal I'm not. Are there many people that are? Is this not just a matter of learning to use shell keybindings effectively? That and aliases does wonders to avoid repetitive typing. Many times I type `git s` (alias for `git status -s`) out of reflex when I really meant to do `ls`. When I forget to add `-a` to `git ci -m ...` (`ci` being `commit`) and get…

I bound hstr to CTRL-R (https://github.com/dvorka/hstr) and then just search the history for the keywords I need. Only rarely is a command not already stored in the history.

Re: Show HN: I made a tool that made me faster at Git

#160
post #82

Earlier quoted context omitted.

I use `s` to launch a new terminal window in the same directory as the shell that called it. This way, I launch a terminal, go to a project directory, and then type s a few times to get sufficient terminals in that context. I know it's popular, but I think I'd find it confusing for completely separate commands to relate like that. It's like cups; I was really surprised to find that the shell command `cancel` was abou…

You might want to check out tmux. I've changed my terminal to "st -c tmux" and every time I open a terminal window I get access to multiple frames, (nearly) infinite scrolling, window management and more.

I use tmux when I'm connected on a remote computer and want to do a command that takes a long time and that I don't want to kill if I happen to cut the connection for any reason (e.g. I leave the wifi range).

As to infinite scrolling and window management, I prefer to set the scrollback buffer length on my terminal (urxvt) to a ridiculously large number, and use a real window manager (i3 for me). It's kind of weird how so many applications have their own specific window manager inside them, like tmux (windows and tabs) or text editors (vim and emacs windows and tabs) or browsers (firefox and chromium tabs) or file managers (dolphin and pcmanfm tabs) or spreadsheets (sheets). i3 allows me to tile, tab, or stack any windows I want in any arrangement with a single set of keybindings (as opposed to the differing keybindings of each application).

Anyway, another thing that's cool about tmux is copy mode. It's awesome to execute a command, hit a key to be able to move the cursor throughout the whole buffer, and copy some piece of the output any command you've executed there, to then paste in a new command. I found that urxvt has an extension that allows the same thing, and it uses the system clipboard! So, I can not only use what I copy for a new command, I can use it elsewhere like copying a url and pasting it on a web browser using only the keyboard. It's also useful to do searches in the output of commands I've executed. So, if run a command that produces a lot of output and I want to know if it outputted something in particular, but I don't want to rerun it to pipe to less or grep or I know that it's not going to result in the same output, I can just hit a key, type what I want to search and see if it finds it.

Post reply on HN