Skip to content

Instantly share code, notes, and snippets.

@jsomara
Created May 22, 2012 16:57
Show Gist options
  • Save jsomara/2770238 to your computer and use it in GitHub Desktop.
Save jsomara/2770238 to your computer and use it in GitHub Desktop.
Fun with git addons
some git demo notes https://github.com/alikins/gitconfig :
# show branches by most recent activity
git brage/tbrage
# summary of branches with tracking info
git branch -vv
# try to find finds files that look uncommitted
# also, uses "ack" which is awesome
# in particular, ack -f, which shows all the things that look like common source
git stat
# try to find commits on feature branches not merged
# into master
git checkcommits
# less ugly log -p output for po/pot files
# uses .gitattributes and "textconv" for content
# specific diffs
.gitattributes
# show last commit from eveyr branch
brlog
# for a given file, show diff from latest commit in each branch
fileheads
https://github.com/jdob/sandbox/blob/master/synergy.conf
strace -f -o /tmp/cap.out -e trace=network ./your_command_here
the -f makes it follow forks, -o saves output to a file, and -e will make only a subset of system calls be outputted
there is also strace -c -f -p <pid> which will show how long a process ran certain types of calls
also there is "ltrace" which adrian showed me during the demo
Git diff for words: dfw = diff --word-diff
================================================================================================================
Package Arch Version Repository Size
================================================================================================================
Installing:
zed-sh i686 4.3.17-1.fc16 updates 812 k
Installing for dependencies:
libeh i686 1.4.6-1.fc16 updates 104 k
libvensionsmoothie i686 1.3.12-1.fc16 fedora 82 k
libmullet i686 1.3.12-1.fc16 fedora 16 k
libhockey i686 2.2.22-2.fc16 updates 73 k
Transaction Summary
================================================================================================================
Install 1 Package (+4 Dependent packages)
Total download size: 1.1 M
Installed size: 3.2 M
Is this ok [y/N]: N
Best zsh theme ever: https://github.com/jdob/sandbox/blob/master/jdob.zsh-theme
zsh searching:
these search based on the start of what you're typing:
bindkey "^P" history-search-backward
bindkey "^N" history-search-forward
these search the entire line:
bindkey "^F" history-incremental-search-forward
bindkey "^R" history-incremental-search-backward
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment