国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

github - git checkout -b develop origin develop ?
習(xí)慣沉默
習(xí)慣沉默 2017-05-02 09:52:22
0
4
1063

Teacher Liao Xuefeng’s git tutorial says this:

But why does it look like this after I perform the operation?

Also, I don’t quite understand this command. Which of the following does Teacher Liao mean? Or neither?

1. The dev branch already exists remotely. What does this command mean to create a dev branch locally and clone the contents of the remote dev branch locally? ? ?

2. The remote does not have a dev branch yet. This command means to create a dev branch locally and remotely at the same time???

I am new to git, please give me some advice

習(xí)慣沉默
習(xí)慣沉默

reply all(4)
迷茫

dev 前面 有origin 分支全名是origin/dev

As the name suggests, the remote one dev分支,checkout -b is a new branch, followed by the name of the new branch.

git checkout --helpYou can see the basic information

漂亮男人

For the former, if this branch does not exist on the remote end, it will not be created. You can practice it

巴扎黑

First of all, neither of the two guesses you listed are quite right.

Actually, Liao Da said it very clearly:

You must create the dev branch of the remote origin to the local

So the premise for you to use that command is that the remote dev branch already exists.

The function of that command is also very simple. It is to create a local branch that tracks the remote branch. That is, first build a branch locally, and then set the remote branch to be tracked for it. It is not redundant as the poster said. operation.

Secondly, I think what makes the poster confused is these local branches:

These branches are the branches that appear after you synchronize with the remote (git push, git fetch, git pull) and other operations. They are equivalent to the references of the remote branch. In layman's terms, these local references can represent the remote branch.

The operation of the command git checkout -b develop origin develop mentioned by the poster is based on these references, so even if your computer is currently offline (not connected to the network), it can still work normally. The reason is simple, this command only operates on references to remote branches, and these references are located locally.

Peter_Zhu

First, your ordersgit checkout -b develop origin develop是錯(cuò)誤的,因此才會(huì)報(bào)這樣的錯(cuò)誤,注意origin和develop之間是要有/的。因此,正確的命令是git checkout -b develop origin/develop
我對(duì)該命令的理解是:本地新建一個(gè)分支develop,并切換到新建的分支develop,并且建立develop與遠(yuǎn)程分支origin/develop的跟蹤關(guān)系。查看本地分支的跟蹤分支(上游分支)命令:git branch -vv.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template