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
.