Step One
- get gitbash: download from here install and open it
- name:
git config --global user.name "Biswajit Biswas"
- email:
git config --global user.email "[email protected]"
- go to root directory:
cd ~
- create .ssh directory:
mkdir .ssh
- generate SSH Key:
ssh-keygen -t rsa -C "[email protected]"
- copy the SSH key from:
id_rsa.pub
Step Two
- go to your github account settings and click SSH and GPC keys
- click
new SSH key
button - give it a title
- paste the key that you copied from
id_rsa.pub
into the key input field.
Testing
- connection:
ssh -T [email protected]
it will show your github user name (jfbiswajit) - config details:
git config --global --list
it will show you your all git config details
SSH settings (Optinal)
Host github.com
User [email protected]
HostName ssh.github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa
Port 443
Create Alias (.gitconfig)
[user]
name = Biswajit Biswas
email = [email protected]
[alias]
al = !git config --get-regexp ^alias\\. | sed -e s/^alias\\.// -e s/\\ /\\ =\\ /
st = status
rs = !git reset --hard && git clean -fd
cm = !git add . && git commit -m
gtc = reset --merge
sw = switch
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
br = branch
amd = !git add . && git commit --amend --no-edit
pp = !git add . && git commit -m "\"feat: Quick updates and sync\"" && git push origin HEAD
[core]
editor = nano
[init]
defaultBranch = master