Live data from Hacker News

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

github.com

71–80 of 235 posts

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

#71

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…

I've been playing around with hub recently, but ended up commenting out the "source hub alias" line because a) since I use aliases, you might as well be explicit, b) I'm tired of having to pipe my aliases to `sed 's/hub/git/g'` when I do `which my_git_alias` to send to other people, and c) I don't want to support github conflating the two when it's not that hard to remember which does what even if you don't use aliases.

Another tip, I only occasionally need git autocompletion withh aliases, but in zsh you can do something like this:

  # Enable zsh git completion for our aliases. 
  # See     https://github.com/mislav/dotfiles/blob/d82e79b8a500891a02ab28171974d68be7a35e12/shrc/git.sh
  if [ -n "$ZSH_VERSION" ]; then
    compdef _git g=git
    compdef _git gc=git-commit
    compdef _git gco=git-checkout
    compdef _git gd=git-diff
    compdef _git gb=git-branch
    compdef _git gst=git-status
    compdef _git gp=git-push
    compdef _git gd=git-diff
  fi
And obviously bash has an equivalent.

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

#72
post #68

One Git UI that I absolutely love but I rarely see mentioned is GitKraken. It's so nice having a fully cross-platform Git GUI, that's attractive and intuitive.

To be honest, they try to compete with souretree and git tower but they are there is a huge difference in the performance since GitKraken is made on electron and really slow when looking at large diffs.

I am a long time git tower user, and i have given GitKraken more than a few shots. I always go back to a hybrid command line and git tower workflow

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

#74
post #67

Might be a good opportunity to advertise my git-send bash function / zsh plug-in: http://github.com/robertzk/send.zsh

While we're at it:

   git_show_blame () {
   	if [ -z "$3" ]
   	then
   		printf "USAGE: git_show_blame filepath start_line_num end_line_num" && return 1
   	else
   		[ ! -z "$4" ] && printf "\\n${LPURP}[git_show_blame]${NC} Warning: extra arguments provided. Ignoring everything after the first 3\\n\\n"
   		git show $(git blame "$1" -L "$2","$3" | awk '{print $1}')
   		return $?
   	fi
   }
Use with recursive search `grep -Rn your_regex .` to track down the original commit that your pesky coworker added two years ago without any corresponding documentation for an alert that's going critical at 2am...(only slightly exaggerating there :P)

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

#76
post #12

Earlier quoted context omitted.

Which interface can do the above trivially with git?

SourceTree's interactive rebase feature is amazing at the first one. You can also just change a dropdown to "Amend" and start changing your most recent commit. TortoiseHg's search bar was amazing at deciding whether you were searching for commit message, author, or what. You'd just type "bugfix pickme" and you'd get back only the commits you needed. Check out master, right-click the batch, graft. I have five differen…

TortoiseHg has the dropdown > Amend feature too.

Guitar ( https://soramimi.github.io/Guitar/ ) is the closest thing i've found to TortoiseHg for git, really promising but not yet fully baked - with a little help that could be a real TortoiseHg successor.

Everything other git GUI i've tried has some problems (git gui + gitk is reliable and featureful, but no grafting & has that Tk UI; git-cola is crashy and the DAG view isn't properly integrated; qgit and gitg can't push to remotes; sourcetree and gitkraken are nonfree; gitextensions and tortoisegit don't run on Linux).

One feature of git gui & gitk that TortoiseHg badly misses, though, is the option to stage lines for commit instead of just hunks.

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

#78
post #40

Earlier quoted context omitted.

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.

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 ~200 folks in a starting-to-get-there "Agile" model.

It is actually the worst for the managers - they spend a surprising amount of time noodling around in Jira to feed the workflows. For individual contributors, it works and isn't too much overhead.

From an administration standpoint, it is OK (we run the on-prem version). More stable than some enterprise monstrosities, but the with occasional problem. The plugin-store-thing is annoying - somehow it manages to entice nearly every new business-side user into asking for some random thing, they usually get what they want, and then they sit unused aside from occasionally breaking things.

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

#79
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? 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…

Do you view that as in any way acceptable for a UI? All of these things are ultra-common operations. If Outlook were written this way, you'd have to type git inbox --full-conversation -next to read an email, and read it in less .

> Do you view that as in any way acceptable for a UI?

The reason git is great as a console program is because the fundamental underlying problem you're trying to solve (graph manipulation) is complex. Graphical UIs only work for simple problems.

I think most people would like a simple graphical UI, but no one has been able to create one that has the same power as the textual one.

This is akin to the reason people don't use visual programming languages.

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

#80
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 :)
Post reply on HN