是否有可能同一个项目同时查看多个git分支? [英] Is it possible to view multiple git branches at the same time for the same project?

查看:1269
本文介绍了是否有可能同一个项目同时查看多个git分支?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有2个分支,这些分支尚未准备好合并,但有一些互补逻辑,我想在合并前检查它们。



Can我检查出同一个项目的多个git分支?是否有可能?

解决方案

您可以简单地将存储库复制到新位置(通过字面复制目录或使用< git clone --shared / git-worktreerel =noreferrer> git-worktree ,用于从单个存储库实例创建多个工作目录。
$ b

否则,合并之前比较分支之间文件的主要方法是 git diff


I have 2 branches, which are not ready to be merged yet, but have some complementary logic, which I'd like to review (before merging)

Can I check out multiple git branches of the same project? Is it possible?

解决方案

You can simply copy the repository to a new location (either by literally copying the directory, or using git clone --shared) and check out one branch per location.

You can also use git-worktree for creating multiple working directories from a single instance of a repository.

Otherwise, the primary means for comparing files between branches prior to merging them is git diff.

这篇关于是否有可能同一个项目同时查看多个git分支?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆