众所周知,git checkout is a very overloaded command. And I do understand that certain commands got introduced to distribute, e.g. to git switch.
在我使用以下命令之前:
$ git checkout <existing-branch>
$ git checkout <hash>
$ git checkout -b <new-branch-name>
Run Code Online (Sandbox Code Playgroud)
所以我想知道git switch介绍后,剩下的目的是什么git-checkout?这是一个已弃用的命令吗?
首先,当我克隆 Git 存储库时,我位于master 分支中。但我已经创建了一个远程开发分支。我跑git fetch origin develop。然后,我使用 git checkout develop它并切换到一个新的分支开发,如下所示:
它创建了当地新开发的分支机构。如何切换到我的原始开发分支远程分支。如果我使用git checkout origin/develop。它是这样的:
如何切换到远程开发分支?