Git 全局设置:

git config --global user.name "sdafd"
git config --global user.email "436565@qq.com"

创建 git 仓库:

mkdir NEW
cd NEW
git init
touch README.md
git add README.md
git commit -m "first commit"
git remote add origin https://git.oschina.net/sdafd/NEW.git
git push -u origin master

已有项目?

cd existing_git_repo
git remote add origin https://git.oschina.net/sdafd/NEW.git
git push -u origin master

 查看配置信息的相关命令
   查看所有配置

git config --list

 查看某个环境变量的配置

$ git config user.name

 查看Git 的各命令的用法
git help 或者 man git
查看某条命令怎么用,如config:

$ git help config

 系统配置

/etc/gitconfig文件:针对系统中所有用户的配置,若使用 git config 时用–system 选项,读写的就是这个文件。

 

转载于:https://www.cnblogs.com/zhuiluoyu/p/4902387.html

Logo

瓜分20万奖金 获得内推名额 丰厚实物奖励 易参与易上手

更多推荐