Under 1000 opened bugs for Phobos

H. S. Teoh via Digitalmars-d digitalmars-d at puremagic.com
Tue Nov 3 16:02:39 PST 2015


On Tue, Nov 03, 2015 at 11:06:57PM +0000, Chris via Digitalmars-d wrote:
> On Tuesday, 3 November 2015 at 19:42:58 UTC, Andrei Alexandrescu wrote:
> 
> >
> >I wrote this: http://wiki.dlang.org/Starting_as_a_Contributor, is it
> >what you need it to be? -- Andrei
> 
> "Then, github detects the new code and offers assistance to create a
> pull request with just a couple of clicks."
> 
> The problem is when your own branch is a few weeks/months old. Then
> you have to do some upstream/update etc. magic. It happened to me once
> or twice. It put me off a bit, although I only fixed typos and trivial
> stuff like that.

It's not that hard. The thing is, the best way is to ALWAYS make changes
in a topic branch, never on master. That way, you just pull upstream
into master and rebase your topic branch:

	git checkout -b my_bugfix
	... # make edits here
	git commit
	git checkout master
	git pull upstream master
	git checkout my_bugfix
	git rebase master
	# Now your fixes are updated.
	git push -f origin


> It's not D, it's git(hub) that makes things complicated. It'd be good
> if you could just update your own branch on github (refork it or
> whatever) and then clone it onto your own machine. But it's not that
> straight forward.
[...]

I'm not sure I understand what's so non-straightforward about it. If you
always work in a topic branch, as I suggested above, it should be
relatively painless. It's when you make changes on master and then try
to sync with upstream, that things become very messy, very quickly.

Unless you're complaining about git itself, in which case my only
suggestion is that you have to take the time to learn the "concept"
behind git. It's very likely *not* what most people imagine when they
think of "version control", and it's pretty important that you
understand that when working with git, you have to think in terms of
"directed acyclic graph" rather than "version control" in the
traditional sense of the word. Trying to work with git with the wrong
mental model of what it actually does will inevitably land you in a
situation where you feel like you don't know how to fix it.


T

-- 
Life is complex. It consists of real and imaginary parts. -- YHL


More information about the Digitalmars-d mailing list