Re: [oll-user] Git workflow
Resources for LilyPond and LaTeX users writing (about) music
Status: Alpha
Brought to you by:
u-li-1973
From: Urs L. <ul...@op...> - 2014-01-10 22:01:35
|
Am 10.01.2014 20:21, schrieb Marc Sabatella: > Seems once upon a time (like, within the last 24 hours :-) I saw > something where the basic git workflow fopr the project in terms for > first forking then cloning etc was described. This doens't seem to be > in the actual git workflow document; where is it? Maybe it has become a victim of some "streamlining". It was suggested to make some things about Git workflows less prominent. I could try to find it in the repo history, but I think it isn't worth it. I'd rather explain concretely. > > Trying to find my way through on my own, the first noteworthy thing I > see is that the schumann example is not on the master branch. Is that > right? THat's true but not right. I mean it's an error that the assignment isn't on the master branch. I either missed to update that master branch or I actually did but forgot to push (that was in a different part of town so I can't simply check). _Just now_ I have moved master forward by two commits, so master now contains the two assignments. > Are we supposed to be forking branches rather than the master? Hm, just to be precise: you're not forking a branch but a repository. That is: you have forked the complete repository, which contains all branches. Maybe that's what you meant, I just think these issues have to be clear. Now to the branching strategy. The master branch should only move forward when a challenge is (more or less) complete. After a challenge is displayed (that is what I did wrong with the Schumann challenge) a new base branch should be created, in that case it's called 2-schumann-challenge. When you want to do some work you should do: git checkout 2-schumann-challenge % to activate the 'base' branch git checkout -b schumann-marc-note-entry % or whatever name you want to give it The second command creates a new branch for you that is based on the challenge's base branch. Now you'll add commits to that branch until one phase is finished, say the initial music entry. Next thing will be to merge your working branch into the 2-schumann-challenge branch, but I suggest that we'll discuss this when you're there. I have already done this once, with a Schumann branch. When I finished the initial entry I merged that work into the base branch, and history now looks like (simplified): * merge Urs' music entry into 2-schumann-challenge |\ | * Urs: do some work | | | * Urs: do some work |/ * present the challenge = HEAD of master (now that I've updated it) But currently this is only present on the "official" repository and not in your fork (changes aren't propagated automatically). I suppose you added the "openlilylib/engraving-challenges" as the remote "upstream" (through git remote add upstream https://github.com/openlilylib/engraving-challenges.git) Then you can now do git fetch upstream This will download all commits from the upstream repository that aren't on your computer. Or in this case this will tell your local repository that the pointer on the master branch has moved. If you want your local repository to be up to date you should do: git checkout master git merge upstream/master This will make your master branch consistent with the upstream one. Now you can do git push origin And this will push your local master branch to "origin" (which is your fork on Github). (actually you can use "git push" alone in this case). But now I really should stop flooding you ;-) Best Urs |