Live data from Hacker News

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

github.com

81–90 of 235 posts

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

#81

How much time do people spend messing with their source control that extreme tools like this become necessary? I commit like, once a day. What am I doing wrong?

To each his own, but I'd say committing once a day. That's unless I'm wrong in thinking that doing so means your commits are quite big and could be broken up into smaller, more manageable changes.

Personally, I like it when `git diff` displays only one or at most three screenfuls of changes that haven't been committed.

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

#82
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…

Since `git status` is my most common command I've got it aliased to just `s`. Every time I use another machine it throws me off when the command doesn't work :)

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 about print jobs. I'd thought it be something more generic. I like it that git keeps all these functions related as subcommands. Makes things more readable. `git status` is not general system status, it's git's status.

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

#83
post #64

Earlier quoted context omitted.

go build -gcflags=-trimpath=$GOPATH -asmflags=-trimpath=$GOPATH https://stackoverflow.com/a/45302415

Did you try this yourself? Because I already tried it and it didn't work. Remember I said I'm on Windows.

Yes, we do this for our release builds, including Windows. It does only remove the leading prefix (GOPATH) from panics, not the full file path.

I don't think there's a way to remove the whole file paths other than replacing strings in the compiled binary. In our case GOPATH was the only sensitive part (since function names can't be removed either, for reflection to work).

We also couple it with a defer handler to obfuscate panic traces.

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

#84
post #62

If you're an emacs user, I can't recommend magit [1] enough. I was a diehard CLI user and had flags and aliases out the wazoo, and it was still a step change in usabilty and power for me. Staging hunks, rebasing, and stashing are all vastly easier. Amending or editing a commit is a breeze, and it's tied in to all of the other emacs tools you already use, e.g. org-mode to boot! It's easier to see it in action than exp…

Based on those videos, lazygit looks like it does the same things as magit, but with a little more "chrome" (boxes around lists). How do the two projects compare? Could they be merged, or do they have fundamentally different philosophies?

The videos touch upon a fraction of magit’s capabilities; if nothing else, it’s a far more mature project.

But the real power is integration with the rest of emacs/being written in elisp. If I want to change or script behaviour, I have easy access to all the internals, and I can integrate it with other parts of my emacs workflow. For example, I can use magit to view the diff of a coworker’s PR, easily capture snippets, including links to their location in our internal BitBucket instance, into an org buffer, and then write up and send an HTML formatted message with my comments, syntax highlighting, etc to my colleagues with my feedback.

Similarly, my TODO list is managed by org, and I can have links to commits or files at a certain commit directly in my agenda or notes and jump to them.

This is all within my editor, with all the text editing, code navigating, and linting capabilities it provides!

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

#85

If you're an emacs user, I can't recommend magit [1] enough. I was a diehard CLI user and had flags and aliases out the wazoo, and it was still a step change in usabilty and power for me. Staging hunks, rebasing, and stashing are all vastly easier. Amending or editing a commit is a breeze, and it's tied in to all of the other emacs tools you already use, e.g. org-mode to boot! It's easier to see it in action than exp…

Seeing a former coworker use Magit in Emacs is what got me to look into the Vim version: https://github.com/jreybert/vimagit

From what I gather it's nowhere near as feature-complete, but it lets me create commits with immense ease and precision.

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

#86
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…

Since `git status` is my most common command I've got it aliased to just `s`. Every time I use another machine it throws me off when the command doesn't work :)

I have similar ones set up. 'Pull' and 'push'. Though some days I'm tempted to map all the old SCUMM keyboard shortcuts here.

'y' (yank) = git pull

's' (shove) = git push

'g' (give) = git commit -am x

'o' (open) = git checkout x

'p' (pick up) = git branch x

'l' (look at) = git status

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

#88

How much time do people spend messing with their source control that extreme tools like this become necessary? I commit like, once a day. What am I doing wrong?

I commit dozens of times a day, make half a dozen branches, pick commits between them, and generally (ab)use git as a normal part of my workflow. I will generally push one or two of those commits in the end, typically a Frankenstein creation comprised of all that has come before.

There are so many ways to approach a problem in any given codebase, and I rarely know which will be the best without experimenting. Having tools that reduce the burden of experimentation and branching is incredibly powerful.

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

#89
post #83

Earlier quoted context omitted.

Did you try this yourself? Because I already tried it and it didn't work. Remember I said I'm on Windows.

Yes, we do this for our release builds, including Windows. It does only remove the leading prefix (GOPATH) from panics, not the full file path. I don't think there's a way to remove the whole file paths other than replacing strings in the compiled binary. In our case GOPATH was the only sensitive part (since function names can't be removed either, for reflection to work). We also couple it with a defer handler to obf…

[deleted]

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

#90

How much time do people spend messing with their source control that extreme tools like this become necessary? I commit like, once a day. What am I doing wrong?

You should commit waaaay, waaaay more often than once a day. Every small piece of logically fitting together change should go into one commit, so the git history tells a story, it's easy to revert and easy to understand how the code get to the current state and why. you also should write elaborate commit messages to all commit.
Post reply on HN