Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Git Surf

Git Surf

Lightning Talk given at VimLondon Meetup, October 2013

Łukasz Korecki

October 13, 2013
Tweet

More Decks by Łukasz Korecki

Other Decks in Programming

Transcript

  1. git, git-browse, fugitive, vim and oh my (VimLondon, October 2013)

    Łukasz Korecki @lukaszkorecki http://lukasz.korecki.me
  2. ...actually! git-browse has been renamed to git-surf (old repo link

    still works though) https://github.com/lukaszkorecki/git-surf
  3. Problem • I’m editing a file, versioned in git, backed

    by GitHub • I just found a confusing method • Time to ask questions...
  4. Old (busted) way • Go to GitHub • Click some

    links to find the project, • Navigate to the file • Highlight the lines you’re interested in • Copy the url and post it to your team chat/email/whatever
  5. ...or maybe? Vim, with Fugitive :Git surf -r20,30 % Visual

    mode - select offending lines <leader>b
  6. git surf? Enter git-surf • Unix! One thing well (well…)

    • Depends only on coreutils (bash, awk, sed) • Fast
  7. git surf URLs for: - repository - file - commit

    - pull requests (existing/new) - branch comparison Pipeable output Works well with terminals (C+click, urxvt’s url matcher)
  8. Bash? • VMs (Vagrant) • Raspberry Pi(s) • Linode as

    a development server • git is ~35% shell
  9. Surf! • Only supports GitHub urls • Has tests •

    Has vim integration (duh) https://github.com/lukaszkorecki/git-surf