# 初始化git
…or create a new repository on the command line
echo "# init" >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/kisstherain8231/init.git git push -u origin master
…or push an existing repository from the command line
git remote add origin https://github.com/kisstherain8231/init.git
git push -u origin master
# 修改用户名称
git 修改当前的project的用户名的命令为:
> git config user.name 你的目标用户名;
1
git修改当前的project提交邮箱的命令为:
> git config user.email 你的目标邮箱名;
1
如果你要修改当前全局的用户名和邮箱时,需要在上面的两条命令中添加一个参数,–global,代表的是全局。
命令分别为:
> git config --global user.name 你的目标用户名;
1
> git config --global user.email 你的目标邮箱名;