Skip to content

Instantly share code, notes, and snippets.

@damirdev
damirdev / cherry-pick-git
Created January 24, 2018 14:17 — forked from kalenjohnson/cherry-pick-git
Cherry pick upstream to subdirectory
git cherry-pick -Xsubtree=<subdirectory> 517be2a88318de51f51397066575ab07fae825a1 --strategy=recursive -X <theirs>
@damirdev
damirdev / explanation.md
Created January 24, 2018 13:15 — forked from masak/explanation.md
How is git commit sha1 formed

Ok, I geeked out, and this is probably more information than you need. But it completely answers the question. Sorry. ☺

Locally, I'm at this commit:

$ git show
commit d6cd1e2bd19e03a81132a23b2025920577f84e37
Author: jnthn <jnthn@jnthn.net>
Date:   Sun Apr 15 16:35:03 2012 +0200

When I added FIRST/NEXT/LAST, it was idiomatic but not quite so fast. This makes it faster. Another little bit of masak++'s program.

@damirdev
damirdev / git-commit-cleaner.py
Created January 24, 2018 13:00 — forked from kanzure/git-commit-cleaner.py
git-filter-branch examples and notes
"""
Creates pretty-looking commit messages for git. This was created to pretty
print the old-commit-id values for filter-branched-rewritten commits in
pyphantomjs from the phantomjs repository.
"""
import os
import sys
@damirdev
damirdev / 0fixup.md
Created January 24, 2018 12:34 — forked from silent1mezzo/0fixup.md
On undoing, fixing, or removing commits in git

A git choose-your-own-adventure!

This document is an attempt to be a fairly comprehensive guide to recovering from what you did not mean to do when using git. It isn't that git is so complicated that you need a large document to take care or your particular problem, it is more that the set of things that you might have done is so large that different techniques are needed depending on exactly what you have done and what you want to have happen.

@damirdev
damirdev / multiple_ssh_setting.md
Created January 14, 2018 06:26 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"