Skip to content

Instantly share code, notes, and snippets.

@TerraTech
TerraTech / gist:86cdf8fa5c29df3d8ff8a2247739cb2f
Last active November 26, 2018 20:21 — forked from alh13/gist:3856276
git-merge branch A into branch B so that B becomes EXACT copy of A
git merge --no-commit other-branch && git checkout other-branch -- . && git commit
### https://twitter.com/adymitruk/status/69479850846593024
# We needed this once after some intense debugging on the staging branch. We knew
# staging was correct and wanted to merge staging -> production and be sure that
# prod branch never "won" any conflicts
@TerraTech
TerraTech / countries.sql
Created May 13, 2018 23:52 — forked from adhipg/countries.sql
Sql dump of all the Countries, Country Codes, Phone codes.
CREATE TABLE IF NOT EXISTS `country` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`iso` char(2) NOT NULL,
`name` varchar(80) NOT NULL,
`nicename` varchar(80) NOT NULL,
`iso3` char(3) DEFAULT NULL,
`numcode` smallint(6) DEFAULT NULL,
`phonecode` int(5) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
@TerraTech
TerraTech / git-branch-simplify.md
Created August 6, 2017 15:28 — forked from datagrok/git-branch-simplify.md
How to simplify the graph produced by git log --graph

Ideas for improvements to git log --graph

I will maybe someday get around to dusting off my C and making these changes myself unless someone else does it first.

Make the graph for --topo-order less wiggly

Imagine a long-running development branch periodically merges from master. The git log --graph --all --topo-order is not as simple as it could be, as of git version 1.7.10.4.

It doesn't seem like a big deal in this example, but when you're trying to follow the history trails in ASCII and you've got several different branches displayed at once, it gets difficult quickly.