Skip to content

Instantly share code, notes, and snippets.

@CyJimmy264
Last active March 14, 2023 02:11
Show Gist options
  • Save CyJimmy264/556041345135d305f4adc9045255aa98 to your computer and use it in GitHub Desktop.
Save CyJimmy264/556041345135d305f4adc9045255aa98 to your computer and use it in GitHub Desktop.
Tips & Tricks

Emacs

The VC package is built into Emacs and provides some basic support for browsing file versions, browsing logs, checking out, committing, etc. VC commands are bound to C-x v by default.

There are several commands to access other revisions. If you know what revision you want to open, press C-x v ~ (vc-revision-other-window). To open the last revision that changed a given line, press C-x v g (vc-annotate), and press f (vc-annotate-find-revision-at-line) on the desired line. If you want to find and open a revision based on its log message, run C-x v l (vc-print-log) and press f (log-view-find-revision) when the cursor is on the desired commit.

Shell

https://dev.to/equiman/why-oh-my-zsh-is-so-cool-31gd

OMZ git plugin

Aliases (with custom): gco gcb gd gs gds gl gp grbi gcmsg gwip / gunwip gsta / gstp

Custom:

alias gds="gd --staged"
alias gs="gss"
alias glolp="glol -p"
alias gdmb="git diff $(git merge-base --fork-point master)"

Zeal docs

Hotkeys & instant search

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment