这样的Git指南想要很久了。
Git
创建新分支:
git branch <branch_name>
查看分支列表:
git branch --list
删除分支:
git branch -D <branch_name>
切换分支:
git checkout <branch_name>
设置分支提交目标:
git push --set-upstream origin <branch_name>
提交代码,同步到服务器:
git commit -a -m "comments"
git push
初始化账号:
git config --global user.name "Your Name"
git config --global user.email "your_email@whatever.com"
git config --global push.default current
复制远程的代码仓库到本地:
git clone https://<username>@git.oschina.net/skjy/learngit.git
cd learngit
从远程仓库获取最新的更新:
git pull
创建一个测试文件test.txt
添加这个文件到git:
git add test.txt
提交修改到本地仓库:
热门内容
最新内容
- 1 天 20 小时 ago
- 6 天 21 小时 ago
- 1 周 6 天 ago
- 2 周 ago
- 2 周 3 天 ago
- 3 周 ago
- 3 周 ago
- 4 周 ago
- 1个月 2 周 ago
- 1个月 2 周 ago
最新评论