This is my cheat sheet for everything I need to use in my daily work. I don't want to spread them into different cheat sheets because it's inconvenient to find each one when they are separate.
See this Stack Overflow answer. Use git merge-base
. For example:
$ git merge-base branch2 branch3
050dc022f3a65bdc78d97e2b1ac9b595a924c3f2
Create: tar -zcvf tar-archive-name.tar.gz source-folder-name
Extract: tar -zxvf tar-archive-name.tar.gz
sudo lsof -i :8000
cd
into the folder you want to patch and run:
patch --dry-run -p1 < /path/to/patch/file