Skip to content

Instantly share code, notes, and snippets.

@amfine-soft-swen
amfine-soft-swen / reset.js
Created August 22, 2017 13:30 — forked from 19h/reset.js
Node.js — Clear Terminal / Console. Reset to initial state.
console.reset = function () {
return process.stdout.write('\033c');
}
@amfine-soft-swen
amfine-soft-swen / branch-fu.md
Created June 20, 2017 13:35 — forked from unbracketed/branch-fu.md
Moving commits between branches

Example: Moving up to a few commits to another branch

Branch A has commits (X,Y) that also need to be in Branch B. The cherry-pick operations should be done in the same chronological order that the commits appear in Branch A.

cherry-pick does support a range of commits, but if you have merge commits in that range, it gets really complicated

git checkout branch-B
git cherry-pick X
git cherry-pick Y