Skip to content

Instantly share code, notes, and snippets.

@mrhjkim
mrhjkim / gitcheats.txt
Created March 7, 2019 07:50 — forked from chrismccoy/gitcheats.txt
git cheats
# shortform git commands
alias g='git'
# get a list of all commit messages for a repo
git log --pretty=format:'%s'
# find the nearest parent branch of the current git branch
git show-branch -a | grep '\*' | grep -v `git rev-parse --abbrev-ref HEAD` | head -n1 | sed 's/.*\[\(.*\)\].*/\1/' | sed 's/[\^~].*//'
# push changes to an empty git repository for the first time
@mrhjkim
mrhjkim / gist:9046510
Last active August 29, 2015 13:56
network name space in linux
network name space in linux.
create two network name spaces each having ip of 10.0.0.1 and 10.0.0.2 and ping test
configuration
host:s1-eth <-----> ns1:h1-eth
host:s2-eth <-----> ns2:h2-eth
1. create network name space
ip netns add ns1
ip netns add ns2