terrible ideas in git - corey quinn, futureadvisor - devopsdays tel aviv 2015
TRANSCRIPT
Terrible Ideas in GitPresented by
Corey Quinn of FutureAdvisor [email protected]
@Quinnypig on Twitter
Everyone will learn something today.
What is Git?
Tracks changes to files and directories.
Git makes you feel stupid.
Written by Linus Torvalds
• Writing git
Written by Linus Torvalds
• Writing git
• Creating Linux
Written by Linus Torvalds
• Writing git
• Creating Linux
• Calling people morons on the internet
Git lets you do very, very powerful things.
Git lets you do very, very stupid things.
You can commit large binaries to git.
Don’t try this.
• git-annex • git-lfs
You can commit secrets to git.
Don’t try this.
You can… I don’t even know what this is.
Don’t try this.
You can set up custom shell aliases around git.
Don’t try this.
alias such=git alias very=git alias wow='git status'
Don’t try this.
You can completely screw over your
coworkers.
Don’t try this.
alias yolo= 'git commit -am "DEAL WITH IT" && git push -f origin master'
Don’t try this.
We’ve shown that git can make us feel stupid.
Help git make you feel smarter.
git config --global help.autocorrect 8
Let the git hate flow through you.
Useful Git related tools
Does anyone have more than one git repository that they care about?
myrepos (or ‘mr’ as the elderly call it.)
Step 1: Run “mr register” inside of
each repository you care about
This builds a ~/.mrconfig
Step 2: Run “mr update” and watch as it updates all of your repositories in
series.
Not just git; mr also supports svn, mercurial, bzr, darcs,
fossil, cvs, veracity, and more.
Limit operations with sane directory structures
Step 3: Pass it on.
vcsh
$HOME |-- $XDG_CONFIG_HOME (defaults to $HOME/.config) | |-- mr | | |-- available.d | | | |-- zsh.vcsh | | | |-- gitconfigs.vcsh | | | |-- lftp.vcsh | | | |-- offlineimap.vcsh | | | |-- s3cmd.vcsh | | | |-- tmux.vcsh | | | |-- vim.vcsh | | | |-- vimperator.vcsh | | | `-- snippets.git | | `-- config.d | | |-- zsh.vcsh -> ../available.d/zsh.vcsh | | |-- gitconfigs.vcsh -> ../available.d/gitconfigs.vcsh | | |-- tmux.vcsh -> ../available.d/tmux.vcsh | | `-- vim.vcsh -> ../available.d/vim.vcsh | `-- vcsh | |-- config | `-- repo.d | |-- zsh.git -----------+ | |-- gitconfigs.git | | |-- tmux.git | | `-- vim.git | |-- [...] | |-- .zshrc <----------------------+
One last trick.
myrepos: https://myrepos.branchable.com vcsh: https://github.com/RichiH/vcsh thefuck: https://github.com/nvbn/thefuck
Any questions?
Terrible Ideas in GitPresented by
Corey Quinn of FutureAdvisor [email protected]
@Quinnypig on Twitter