Linear git history

37 views
Skip to first unread message

Daniele Nicolodi

unread,
Aug 2, 2020, 10:16:59 PM8/2/20
to Beancount
Hello,

I think that striving to have linear history rather than (sometimes
crossed) merges is a worthwhile goal to keep the repository and history
more tidy. The git branching model is something that I never been to
fond of.

I don't have much experience with Github managed projects, but it seems
that the default action to incorporate PRs into the master branch is to
do merges. I think the "Rebase and merge" is to be preferred, however,
it is offered as the last option in the web interface.

Looking around in the web interface, it seems that it is not possible to
change the default method used, it is only possible to disable the
"Create a merge commit" and "Squash and merge" options (the later does
not seem like a great idea to me anyway) to leave only "Rebase and merge".

The heavyweight option is "Require linear history": it forbits merge
commits altogether. This would probably be my preference, but it may be
a bit too restrictive.

What do people think?

Cheers,
Dan

Martin Michlmayr

unread,
Aug 3, 2020, 1:41:11 AM8/3/20
to bean...@googlegroups.com
* Daniele Nicolodi <dan...@grinta.net> [2020-08-02 16:16]:
> I don't have much experience with Github managed projects, but it seems
> that the default action to incorporate PRs into the master branch is to
> do merges.

I really dislike that and always wonder why it's the default on GitHub.

> I think the "Rebase and merge" is to be preferred, however, it is
> offered as the last option in the web interface.
>
> Looking around in the web interface, it seems that it is not
> possible to change the default method used

I *believe* it remembers the type of the last merge you did and offers
that as the default.
--
Martin Michlmayr
https://www.cyrius.com/

Martin Blais

unread,
Aug 3, 2020, 3:17:20 AM8/3/20
to Beancount
I'm indifferent (I use log --graph so it's always clear enough to me). I can rebase in the future if you prefer.


--
You received this message because you are subscribed to the Google Groups "Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beancount+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/20200803014102.GD2881%40jirafa.cyrius.com.

Stefano Zacchiroli

unread,
Aug 3, 2020, 9:11:26 AM8/3/20
to bean...@googlegroups.com
On Mon, Aug 03, 2020 at 09:41:03AM +0800, Martin Michlmayr wrote:
> > Looking around in the web interface, it seems that it is not
> > possible to change the default method used
>
> I *believe* it remembers the type of the last merge you did and offers
> that as the default.

That's also my (unscientific) feeling based on personal experience.

There seems to also exists a per-repo setting about what is *allowed*,
(not the default):

https://docs.github.com/en/github/administering-a-repository/configuring-commit-rebasing-for-pull-requests

So if we end up choosing one method, we can disable the others.

Cheers
--
Stefano Zacchiroli . za...@upsilon.cc . upsilon.cc/zack . . o . . . o . o
Computer Science Professor . CTO Software Heritage . . . . . o . . . o o
Former Debian Project Leader & OSI Board Director . . . o o o . . . o .
« the first rule of tautology club is the first rule of tautology club »
Reply all
Reply to author
Forward
0 new messages