标签:use mail 远程 ignore origin pre 创建 设置 name
1、设置全局配置git config --global user.name "muxiaoqi"
git config --global user.name "muxiaoqi@email.com"
2、创建一个新的仓库
git clone git@muxiaoqi.com:muxiaoqi/test.git
cd test
touch README.md
git add README.md
git commit -m "add README"
git push -u origin master
3、已存在文件夹
cd existing_folder
git init
git remote add origin git@muxiaoqi.com:muxiaoqi/test.git
git add .
git commit
git push -u origin master
4、存在本地仓库
cd existing_repo
git remote add origin git@muxiaoqi.com:muxiaoqi/test.git
git push -u origin --all
git push -u origin --tags
5、更新忽略文件
git rm -r --cached .
git add .gitignore
git commit -m "update .gitignore"
6、关联本地分支到远程分支
git branch --set-upstream dev origin/dev
标签:use mail 远程 ignore origin pre 创建 设置 name
原文地址:https://blog.51cto.com/muxiaoqi/2433105