Skip to content

Instantly share code, notes, and snippets.

igregson /
Last active Mar 21, 2020
quicker to reference a gist than search the innerwebs...

Resolving merge conflicts

git checkout --ours index.html
git checkout --theirs _layouts/default.html

Remove files from repo after Adding to gitignore

igregson /
Last active Apr 7, 2016
local/remote sync workflow setup notes -- one "source of truth" production repo with no intermediary (ie: github|bitbucket|etc) -- useful for flat file CMSes (Statamic, Kirby, etc, etc) or static site setups with production-side content management abilities

[remote] Intialize Remote Repo:

# ssh into remote
# initialze empty repo
git init

[local] Setup Local:

# where "user@ip:/path/to/repo.git" is your specific remote user, ip, and path
View remote setup for Statamic
// clone the repo into remote
// note: trailing `.` is for cloning without parnet dir
git clone -b BRANCH-NAME --single-branch REPO-SSH-OR-HTTPS-PATH .
igregson / php-cli-server-fix.php
Created Jan 14, 2016
php command-line server fix
View php-cli-server-fix.php
// The Story:
// PHP's cli server (`php -S localhost:7777`) treats dots (`.`) in paths
// as a stataic file request...
// Many seem to consider this a bug, except the PHP-powers-that-be
// see:
// So...
// Turns out there's a workaround
You can’t perform that action at this time.