Skip to content

Instantly share code, notes, and snippets.

@aras-p
aras-p / hg and git snippets and stats.md
Last active September 28, 2021 10:02
hg churn and log cheat sheet, ono graphql

Git

Fetch single branch (trunk): git fetch origin trunk:trunk (add -u flag when already on that branch)

Make a new worktree (similar to hg share): git worktree add --no-checkout --detach ../mynewfolder

Converting Hg repo to Git:

; get https://github.com/frej/fast-export somewhere
@mixin background-image-retina($file, $type, $width, $height) {
background-image: url($file + '.' + $type);
@media (-webkit-min-device-pixel-ratio: 2), (-moz-min-device-pixel-ratio: 2) {
& {
background-image: url($file + '@2x.' + $type);
-webkit-background-size: $width $height;
}
}
}