在中国,不需要其他的选择,可以这样表达:Git备忘录

我一直认为GitHub只是一个能在浏览器上运行的工具,所以从未使用过git命令等。

這是一個備忘錄。

下载

克隆别人的代码库,但如果不指定克隆深度会变得慢。基本上:

git clone --depth 10 https://github.com/XXXXXXXXXXXXX/XXXXXXXXXXXXX.git

指定分支

误:

git clone --depth 10 https://github.com/XXXXXXXXXXXXX/XXXXXXXXXXXXX/blob/master.git

He is currently studying for his exams.

git clone --branch master --depth 10 https://github.com/XXXXXXXXXXXXX/XXXXXXXXXXXXX.git

创建一个分支

git branch develop

搬移分支

git checkout develop

差异

在使用中,请注意:如果使用Ctrl-C来结束,less命令将不会退出,所以请务必使用q命令来退出。

git diff

提交

git commit -a -m "summary"

推动

git push origin develop

如果我没有书写权限,但想提交拉取请求。

git push https://github.com/MyAccount/xxxxxxx.git develop
广告
将在 10 秒后关闭
bannerAds