1、设置全局配置

git config --global user.name "muxiaoqi"git config --global user.name "muxiaoqi@email.com"

2、创建一个新的仓库

git clone git@muxiaoqi.com:muxiaoqi/test.gitcd testtouch README.mdgit add README.mdgit commit -m "add README"git push -u origin master

3、已存在文件夹

cd existing_foldergit init git remote add origin git@muxiaoqi.com:muxiaoqi/test.gitgit add .git commit git push -u origin master

4、存在本地仓库

cd existing_repogit remote add origin git@muxiaoqi.com:muxiaoqi/test.gitgit push -u origin --allgit push -u origin --tags

5、更新忽略文件

git rm -r --cached .git add .gitignoregit commit -m "update .gitignore"

6、关联本地分支到远程分支

git branch --set-upstream dev origin/dev