Skip to content

Instantly share code, notes, and snippets.

@raja-ashok
Last active March 7, 2019 13:28
Show Gist options
  • Save raja-ashok/90cffe86dee5e71a24cb1675040814aa to your computer and use it in GitHub Desktop.
Save raja-ashok/90cffe86dee5e71a24cb1675040814aa to your computer and use it in GitHub Desktop.
1) Git SSH configuation
Generate RSA key pair
- ssh-keygen -t rsa -b 4096 -C "your_email@domain.com"
- This generates 2 file, id_rsa and id_rsa.pub in ~/.ssh directory.
- Copy the content of id_rsa.pub and configure in the git settings under the account details.
Then after opening terminal, always execute below 2 command to load the RSA private key (id_rsa).
After loading, all git commands can be executed without entering credentials every time.
- eval $(ssh-agent -s)
- ssh-add ~/.ssh/id_rsa
2) Git patching
git format-patch <master_branch> -o <dir>
git am <patch_file>
- This commits
git apply <patch_file>
- This modifies but does not commits
3) Git clone
git clone without verifying server cert
- git config --global http.sslverify false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment