使用 config 配置多个 ssh 地址

  • 在 .ssh路径下新建文件 config
1
2
3
4
Host github.com
  HostName github.com
  User git
  IdentityFile ~/.ssh/id_rsa_github

可以非常方便的配置多个git地址。

新建一个ssh

ssh-keygen -t rsa -b 4096 -C “your_email@example.com

查看代码统计

1
git log --author="your-name" --since=1.day.ago --pretty=tformat: --numstat | awk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf "added lines: %s, removed lines: %s, total lines: %s\n", add, subs, loc }'