Re: [PATCH 00/28] Use main as default branch name
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 18, 2020, 00:10 UTC
- Message-ID
- <xmqqmtzf4j96.fsf@gitster.c.googlers.com>
- In-Reply-To
- <CAMP44s3750bSdmw4A=KU=UgffOPiQwB8ECk9YRPe8mh50Og8Ow@mail.gmail.com>
Felipe Contreras <felipe.contreras@gmail.com> writes:
Show 5 quoted lines
> If we already know "origin/HEAD" is very likely pointing to the > integration branch, then why do we need to know what that branch is > called in that particular project? > > Just refer to that branch as "origin/@", or just "origin".
"git merge origin" turns into "git merge origin/HEAD", I think, and we had it for quite some time.
But repositories may not even have any origin to begin with. The one I am typing this message in certainly does not. And we need some fallback default when origin/HEAD cannot be used anyway, and that is where the convention comes in again. You cannot escape from it, and ...
> That would work for projects that follow the convention, and those who > don't. Why does the tool need to care?
... certainly it would not work for me.