Skip to content

How should we introduce Git branching strategies? #223

Closed Answered by 40thieves
40thieves asked this question in Q&A
Discussion options

You must be logged in to vote

In a recent LDN10 class, the teachers (lead by @jasongwartz) did an ad-hoc workshop to cover branching, as discussed briefly in this Slack thread.

They covered the strategy of checking out to main before creating a new branch, i.e. the both the week-1 and week-2 branches would be based on main.

This has some advantages:

  1. It's likely the most "realistic" strategy in regards to real-world Git usage
  2. It produces the cleanest diff when opening a PR, since by default Github will compare against main

But has some disadvantages:

  1. To switch branches, trainees must have a clean history, which may mean some trainees "get stuck" on the wrong branch. This may then even lead to committing on the wrong…

Replies: 5 comments

Comment options

40thieves
Aug 3, 2023
Maintainer Author

You must be logged in to vote
0 replies
Answer selected by 40thieves
Comment options

40thieves
Aug 3, 2023
Maintainer Author

You must be logged in to vote
0 replies
Comment options

40thieves
Aug 3, 2023
Maintainer Author

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

40thieves
Sep 4, 2023
Maintainer Author

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants