【注意】最后更新于 May 13, 2021,文中内容可能已过时,请谨慎使用。
设置全局提交信息
1
2
|
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
|
修改最后一次提交的用户名信息
``git
git config user.name ‘wangz’
git config user.email ‘wangz@alib.com’
git commit –amend –author=wangz
1
2
3
4
5
6
7
8
9
10
11
12
13
|
### 项目过大问题
>git clone 主工程出现 fatal: The remote end hung up unexpectedly3)
通常的解决办法:
1. 设置提交缓存的大小为 1G:1048576000
git config http.postBuffer 1048576000
2. 否则,需要配置github/gitlab的公钥
生成:`ssh-keygen -t rsa -C "$your_email"`
拷贝:`pbcopy < ~/.ssh/id_rsa.pub`
创建SSHKey:
在github/gitlab新建公钥`add SSH Key`:粘贴到密钥文本框中即可。
|
文章作者
iTBoyer
上次更新
2021-05-13
(ab98fe8)