Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why default branch "template" #128

Closed
plata opened this issue Jul 31, 2023 · 8 comments
Closed

Why default branch "template" #128

plata opened this issue Jul 31, 2023 · 8 comments
Labels
type: discussion Questions, proposals and info that requires discussion. type: docs Related to documentation and information.

Comments

@plata
Copy link
Contributor

plata commented Jul 31, 2023

I tried to git merge upstream/main until I realized that the default branch is called template. Why is this? I understand that this is a template repository but the default branch could (should?) still be main.

@xynydev
Copy link
Member

xynydev commented Aug 1, 2023

The default branch used to be called main, but we restructured to a non-default configuration where only a non-template branch called live is published, which simplified the updating of forks/children. This was kind of a confusing change and would have caused a lot more people to just edit the main branch, which used to be the correct way, so main was renamed to template.

I don't think it'd be necessary, or good, to change it back now.

@plata
Copy link
Contributor Author

plata commented Aug 1, 2023

I'm not so sure if forks even realized that the default branch was changed or just assumed that there was no update (at least that's what I did).

@xynydev
Copy link
Member

xynydev commented Aug 2, 2023

I am currently crunching on a work project, but once that calms down I'll look at the ISO building stuff and make a stable release. After that it should be no more breaking changes until another release, and keep it to mostly fixes and docs updates.

Note that this branch change was not something I pushed in, you can get more in-depth reasoning from @Arcitec #76

@plata
Copy link
Contributor Author

plata commented Aug 2, 2023

@Arcitec can you elaborate a bit more on the envisioned workflow?

  • Is the user supposed to fork or not? My understanding from previous discussions is that startingpoint should be a template repository and the user should not fork it such that they can create multiple repositories from the same template.
  • Why would the user want a copy of the template branch in my repository? I understand that it allows syncing via GitHub GUI but rebasing still must be done manually. This can be done directly on the upstream branch.
  • Why is the live branch released (instead of main)? This only has the effect that the main branch is called live which is at best confusing.

@xynydev
Copy link
Member

xynydev commented Aug 2, 2023

Is the user supposed to fork or not? My understanding from previous discussions is that startingpoint should be a template repository and the user should not fork it such that they can create multiple repositories from the same template.

Fork, if possible. This allows for easier updates from the Github UI. Templating is turned on for some people who prefer it, or easier creation of multiple repos.

Why would the user want a copy of the template branch in my repository? I understand that it allows syncing via GitHub GUI but rebasing still must be done manually. This can be done directly on the upstream branch.

I am not sure about this, for there is some big-brain git-related reason. What I think I understand is that you sync the changes from upstream:template to origin:template, then PR -rebase the new changes and your own. There's some technical reason to why that is superb to just doing merge commits, which is what I personally do because 1. It works 2. I'm lazy 3. I don't need to see all my custom changes in order, I like to see all the changes (including updating from updates with merges) in order.

@plata
Copy link
Contributor Author

plata commented Aug 2, 2023

Ok, if the plan is to do everything via GitHub GUI, I get the point.

Personally, I also merge instead of rebase. Latest when you work with more than one committer, rebasing the main branch will blow up.

@plata
Copy link
Contributor Author

plata commented Aug 2, 2023

Ok, if the plan is to do everything via GitHub GUI, I get the point.

Actually, still no. You can just open a cross repo PR to do the rebase.

Like this:

  • startingpoint branch is main
  • fork
  • change main in your fork
  • create PR from startingpoint:main to fork:main

@xynydev xynydev added type: docs Related to documentation and information. question labels Aug 4, 2023
@xynydev
Copy link
Member

xynydev commented Sep 25, 2023

Closing this issue for now. This is the branch structure we have and I don't really see a reason to change back.

@xynydev xynydev closed this as completed Sep 25, 2023
@xynydev xynydev added the type: discussion Questions, proposals and info that requires discussion. label Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: discussion Questions, proposals and info that requires discussion. type: docs Related to documentation and information.
Projects
None yet
Development

No branches or pull requests

2 participants