Is it possible to view multiple git branches at the same time for the same project?

前端 未结 6 1943
孤独总比滥情好
孤独总比滥情好 2021-01-30 12:24

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 branc

6条回答
  •  借酒劲吻你
    2021-01-30 13:12

    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.

提交回复
热议问题