Live data from Hacker News

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

github.com

31–40 of 235 posts

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

#31
post #5

Earlier quoted context omitted.

> Why do people make a huge fuss over git? Why? It's unclear to me what you're referring to, but the part I can answer is this: > How is git hard? IMHO because it is not intuitively obvious what it means for your "HEAD" to be "detached", or for you to "rebase" onto a "remote branch", or why "checking out" a file reverts your changes, or why "checking out" a branch suddenly clones its files, or why you'd "add" a missi…

I want to edit the commit message of a commit that is 5 commits in the past, that I have not pushed yet. What is the command to do it? Okay so it turns out I made a minor typo in that commit and I want to change it without adding any more commits. What is the command to do it? Okay so now I want to take all commits that have "bugfix pickme" in the subject and cherry-pick them to master. What is the command to do it?…

> I want to edit the commit message of a commit that is 5 commits in the past, that I have not pushed yet. What is the command to do it?

> Okay so it turns out I made a minor typo in that commit and I want to change it without adding any more commits. What is the command to do it?

It seems pretty easy to do an interactive rebase for both these.

> Okay so now I want to take all commits that have "bugfix pickme" in the subject and cherry-pick them to master. What is the command to do it?

This would be pretty simple if you know the hashs of the commits you want to bring over, but more troublesome if you don't. But I can't think of a good interface that makes this trivial without having a specific command for just this action. If this is a common action you do it would be pretty simple make a script which would make that specific command.

Additionally, an interactive rebase can hammer this screw too. With an editor that can delete lines that don't match a regex you can simply rebase your bugfix branch on top of master and get rid of all commits that aren't bugfixes.

I would say that git's existing interface solves this as well as you could expect a GUI or CLI frontend like the post to do.

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

#33
Thanks for making this, it looks great! I'll be giving it a shot tomorrow.

I've been moving more and more to terminal for all of my development. My dev. stack is now: vim; tmux; lynx; ddgr; zsh; and docker. It is game changing for distraction-free programming, consistency between languages, and the ability to use the exact same setup everywhere -- even on remote machines.

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

#34
post #22
post #19

Earlier quoted context omitted.

I'm out of the loop. What's the story here? Why are devs sad about Atlassian and Jira?

I don't think it's any specific event. Many of us are forced to use Jira for everything at work and it has grown from a simple bug tracker to a confusing one-place-for-everything mess.

My favourite part of interning at Google was learning that tickets for Sev0 globe-spanning outages and "the bathroom tiles are too shiny and let you see into other stalls" lived in the same issue tracker. When all you have is a hammer…

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

#35
post #5

Earlier quoted context omitted.

> Why do people make a huge fuss over git? Why? It's unclear to me what you're referring to, but the part I can answer is this: > How is git hard? IMHO because it is not intuitively obvious what it means for your "HEAD" to be "detached", or for you to "rebase" onto a "remote branch", or why "checking out" a file reverts your changes, or why "checking out" a branch suddenly clones its files, or why you'd "add" a missi…

I want to edit the commit message of a commit that is 5 commits in the past, that I have not pushed yet. What is the command to do it? Okay so it turns out I made a minor typo in that commit and I want to change it without adding any more commits. What is the command to do it? Okay so now I want to take all commits that have "bugfix pickme" in the subject and cherry-pick them to master. What is the command to do it?…

> I want to edit the commit message of a commit that is 5 commits in the past, that I have not pushed yet. What is the command to do it?

Probably something like:

    git --rebase -i --force HEAD~6
...followed by setting the commit in question to "edit"; then once the rebase pauses on that commit, using `commit --amend` to edit the message; and finally `rebase --continue`.

> Okay so it turns out I made a minor typo in that commit and I want to change it without adding any more commits. What is the command to do it?

Same as above, except you'd make the necessary change before `commit --amend`.

> Okay so now I want to take all commits that have "bugfix pickme" in the subject and cherry-pick them to master. What is the command to do it? With a decent interface, these actions are basically trivial.

You might be able to do this with one of the filter commands, but I haven't used them enough to know. I'd probably just write a shell one-liner for this instead.

> I've been using git for several years and I have to think way too hard to figure out what to type just to get what I want to happen. All too frequently I just say 'screw it' and make a sad commit because my job is writing software, not wrestling with git commands.

Yeah, it's totally understandable. Between myself and the other dev on my team, I am the de facto git fixer. My coworker occasionally digs himself into a hole and becomes frustrated. Then the next day I do that with CSS, and he has to bail me out. I guess the point is most people have things they are motivated to specialize in.

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

#36
post #19
post #14

Earlier quoted context omitted.

this readme really speaks to me

I'm out of the loop. What's the story here? Why are devs sad about Atlassian and Jira?

I think the reality is that the software is not bad. But it is very often customized to fit ridiculous management desire and it then become difficult to use. And it's always simpler to blame the tool than your boss.

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

#37

Personally I have been typing all git commands manually into the terminal and never felt a need for GUIs or tools such as this. There are a number of git shortcuts defined in my zsh aliases [0]. It goes like: # Git aliases alias g='git' alias ga='git add' alias ghb='git browse' # hub alias ghpr='git pull-request' # hub alias gp='git push' alias gpoh='git push origin HEAD' ... Using these aliases, we rarely have to ty…

If you install bash-completion or use git-aliases [1], you can also get tab completion working for those aliased commands like so [2]. Lets you save some typing even when you need to pass a rarely used (or difficult to remember) flag.

[1]: https://git-scm.com/book/en/v2/Git-Basics-Git-Aliases [2]: https://github.com/nickbarnwell/dotfiles/blob/master/home/.e...

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

#38
post #7

This looks super neat. Will try it out. Although I’m a sourcetree user... lately `git add -i` has changed how I use got massively.

got add -p is pretty nice too then got commit -v to verify the hunks

Dang. So git add -p basically just skips straight to the patch portion and then -v adds a diff to the bottom of the commit message file so you can review it. Nice!

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

#39
post #35

Earlier quoted context omitted.

I want to edit the commit message of a commit that is 5 commits in the past, that I have not pushed yet. What is the command to do it? Okay so it turns out I made a minor typo in that commit and I want to change it without adding any more commits. What is the command to do it? Okay so now I want to take all commits that have "bugfix pickme" in the subject and cherry-pick them to master. What is the command to do it?…

> I want to edit the commit message of a commit that is 5 commits in the past, that I have not pushed yet. What is the command to do it? Probably something like: git --rebase -i --force HEAD~6 ...followed by setting the commit in question to "edit"; then once the rebase pauses on that commit, using `commit --amend` to edit the message; and finally `rebase --continue`. > Okay so it turns out I made a minor typo in tha…

How do your your intervening submodules additions/removals turn out when you rebase?

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

#40
post #19

Earlier quoted context omitted.

I'm out of the loop. What's the story here? Why are devs sad about Atlassian and Jira?

Jira has some asinine design issues, e.g. the only way you can link a git commit to a ticket is by putting the ticket ID into the commit message, generally has confusing choices for UI, code blocks {code}are annoying to add{code} and don't follow any existing conventions, integration with Confluence sucks, basic functionality is locked away in paid extensions, the list goes on

MVP Jira just needs to present a list of stuff to do. But now it's used like a panopticon of social control where I work. And I'm thinking I'm not the only one with stuff like Scaled Agile being out there.
Post reply on HN