使用 tortoisegit 切换分支

发布于 2024-10-03 10:32:06 字数 289 浏览 0 评论 0原文

我在硬盘上克隆了一个 git 存储库。这个 git 存储库不仅包含 master,还包含一个名为 newBranch 的分支。如何使用 tortoisegit 签出新分支?

我用 switch/checkout 命令尝试过,但本地文件没有任何变化。有效的是当我将两个分支克隆到不同的文件夹中时,但我想让它与 tortoisegit 一起使用。

git clone localhost:testProject

git clone localhost:testProject newBranch不同

I cloned a git respository on my hard disc. This git repository contains not only the master but also a branch called newBranch. How can I checkout the new branch with tortoisegit?

I tried it with the switch/checkout command but nothing changed in my local files. What works is when I clone the two branches in different folders like but I want to get it working with tortoisegit.

git clone localhost:testProject

differs from

git clone localhost:testProject newBranch

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

天涯离梦残月幽梦 2024-10-10 10:32:06

在 TortoiseGit 中切换分支时,您有一个复选框选项Force
除此之外,我必须承认我很难过。

You have a checkbox option Force when switching branches in TortoiseGit.
Other than that, I must admit I'm stumped to.

深居我梦 2024-10-10 10:32:06

这对我有用:

  • 右键单击基本文件夹并选择“Git Clone...”。
  • 在弹出窗口中,提供 Git 存储库路径,选择适当的本地文件夹,
  • 选择“分支”选项并输入您的分支名称。单击“确定”。

This is what worked for me:

  • Right click base folder and choose "Git Clone...".
  • In the popup, give the Git repository path, choose appropriate local folder
  • select the Branch option and type-in your branch name. Click Ok.
一花一树开 2024-10-10 10:32:06

从上下文菜单转到设置。
常规 -> 上下文菜单 -> 选择“切换/结帐”。

之后它将在上下文菜单中可见。

Go to settings from the context menu.
General->Context Menu->Select 'Switch/Checkout'.

Afterwards it will be visible in the context menu.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文