GIT tips

Avoiding mistake to send all CC on a git sendmail

git config --global sendemail.suppresscc all

Tips

git config --global help.autocorrect 1

git config --global color.ui auto

git config --global core.editor vim

Git clone under a unstable/slowly connection

Two solutions (or rather workarounds) that come to mind are:

Use shallow clone i.e. git clone --depth=1, then deepen this clone using git
fetch --depth=N, with increasing N. You can use git fetch --unshallow (since
1.8.0.3) to download all remaining revisions.

Get github repository via ssh keypass

git clone git@github.com:<USER>/<REPO>.git

Generating patches

So, how to generate all patches:

git format-patch origin/master-next.. --cover-letter
--subject-prefix="Zesty][PATCH"

After all, send your patches.

git send-email --cc gwalbon@linux.vnet.ibm.com --to kernel-team@lists.ubuntu.com
00*patch

Getting patch from scratch and test

Checking if the patch is clean : git format-patch -k --stdout -1 $commitid | git am -k if not, go checking the files one by one.

Git Quick reference:

  • https://git-scm.com/book/tr/v2/Customizing-Git-Git-Configuration

TMUX

Handling Terminal

New terminal

$ tmux new -s ${NAME}