如果我正在处理 repo 的一个分支,比如说devel
,以下命令之间有什么区别?在这种情况下,我已经添加了一个upstream
遥控器:
$ git fetch upstream devel
From github.com:meteor/meteor
* branch devel -> FETCH_HEAD
和
$ git fetch upstream
remote: Counting objects: 500, done.
remote: Compressing objects: 100% (230/230), done.
remote: Total 326 (delta 227), reused 187 (delta 90)
Receiving objects: 100% (326/326), 46.61 KiB, done.
Resolving deltas: 100% (227/227), completed with 87 local objects.
From github.com:meteor/meteor
* [new branch] appconfig -> upstream/appconfig
* [new branch] check-path -> upstream/check-path
248ff08..4d44a4d ctl-migrate -> upstream/ctl-migrate
2c356d2..bfb8fd3 devel -> upstream/devel
* [new branch] release-0.6.5 -> upstream/release-0.6.5
64b95a4..c0014df shark -> upstream/shark
From github.com:meteor/meteor
* [new tag] release/0.6.5-rc11 -> release/0.6.5-rc11
* [new tag] release/0.6.5-rc12 -> release/0.6.5-rc12
如果没有指定分支,fetch 如何知道要获取什么?
而且,为什么merge命令是
$ git merge upstream/devel
但如果我想将更改推送到我的 fork,我需要说
$ git push origin devel
为什么在一种情况下有斜线而在另一种情况下没有?