一看就懂的博客,给大家安利一下Git命令


1. 在一个空仓库中提交

1
2
3
4
5
6
echo "# ML">> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin xxxxxxxxxxxx
git push -u origin master

2. 在一个已存在的仓库中提交

1
2
git remote add origin xxxxxxxxxx
git push -u origin master

3. xxxxxxx在哪里?

xxxxxxx在哪里?示意图

4. 创建分支并提交分支

1
2
3
4
git branch branch
git checkout branch
git add . git commit -m branch
git push origin branch

创建分支并提交分支示意图


本文早期发布于个人 CSDN 博客:查看原文

站内搜索

没有找到内容!