Workflow

Rust

Creating new worktree

git worktree add -b my-feature ../rust2 master
cd ../rust2
git submodule update --init --recursive
./x.py setup
./x.py build library
rustup toolchain link stage1 build/x86_64-unknown-linux-gnu/stage1
rustc +stage1 -vV
# Running UI tests
./x.py test --stage=1 --keep-stage=1 src/test/ui/...
# Recompiling
./x.py build library --keep-stage=1
# Using the compilier we rebuilt (with logs enabled for a module), dump MIR
RUSTC_LOG=rustc_mir_transform=info rustc +stage1 -Z unpretty=mir-cfg ~/code/rs/my/program.rs

git

Squashing

source

TL;DR

# n = number of commits you want to see in interactive rebase
git rebase -i HEAD~n

Commits are ordered (top to bottom) from oldest to newest. You can only squash newer commits into older commits. Change any commits you want to squash to say s instead of pick.

Pushing

source

Sometimes need to do this:

eval "$(ssh-agent -s)"
ssh-add ~/.ssh/github_id_ed2551