Skip to content

Instantly share code, notes, and snippets.

// 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
igregson / Git-Reference.md
Last active March 21, 2020 14:46
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
igregson / setup--git-remote-source-of-truth.md
Last active April 7, 2016 16:25
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
@igregson
igregson / php-cli-server-fix.php
Created January 14, 2016 22:38
php command-line 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: https://bugs.php.net/bug.php?id=61286
// So...
// Turns out there's a workaround