我有2个分支,尚未准备好合并,但有一些互补的逻辑,我想回顾(合并之前)
我可以查看同一个项目的多个git分支吗? 可能吗?
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?
最满意答案
您可以简单地将存储库复制到新位置(通过字面复制目录或使用git clone --shared ),并检查每个位置的一个分支。
您还可以使用git-worktree从存储库的单个实例创建多个工作目录。
否则,在合并它们之前比较分支之间的文件的主要手段是git diff 。
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.
更多推荐
发布评论