1.新建仓库目录
mkdir learngit
cd learngit
2.将目录变成git可以管理的仓库
git init
3.添加文件到git仓库(可以多文件一起提交 git add file file2)
git add fileName
4提交git
git commit -m "提交备注消息"
5.关联远程仓库
方法1 git remote add origin git@github.com:tiyo1213/tiyogit.git
方法2 git remote add origin https://github.com/tiyo1213/tiyogit.git
6.删除关联
git remote rm origin
7将本地库推送到远程库
git push -u origin master
git push origin master
网友评论