--
You received this message because you are subscribed to the Google Groups "ValidateThis-dev" group.
To post to this group, send email to validate...@googlegroups.com.
To unsubscribe from this group, send email to validatethis-d...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/validatethis-dev?hl=en.
Okay, this is fantastic, Bob! I've been gradually wrapping my brain around the more advanced complexities in Git, and have also reviewed Vincent Driessen's fantastic "A successful Git branching model" post (http://nvie.com/git-model) a couple times. Your in-depth, real world coverage of this flow has really solidified a lot of things for me. I have a couple quick questions/comments...I understand git rebase, and it's slick, but the "git pull --rebase" option was new to me. It makes perfect sense, however, I wonder if a merge to keep a primary forked branch current with the main remote would be fine, since it should automatically just do a fast-forward merge, no? I understand that updating a branch that has modifications can make good use of a rebase, and may even have conflicts to resolve, but just keeping something like master or develop branches current should simply be fast-forward merges, no? Or, does a fast-forward merge even still introduce an unnecessary commit, I wonder?
I was slightly confused by the "Rule #X..." headings in the document, at first. I think my problem is they look a bit like a heading, so I was thinking in that manner, but those statements are often just to emphasize what has just been outlined in the document. The flow of the document's content makes perfect sense, but I think the heading style confused me--maybe just bold text at the same font size as normal content? Maybe I'm being way too particular? :P
I'm just curious as to why you've used "main" as the example alias for the project's remote repo, when "upstream" seems to be a fairy well-established standard (though it's just an agreed upon naming convention, no more). Not that "main" is a poor choice--it makes perfect sense--but "upstream" also makes a lot of sense to me, and it seems a common choice and would be consistent with GitHub's help pages as well.
Finally, if I'm seeing this correctly, I think the screen shots near the end, for your example pull request might be slightly confusing to folks. Assuming the ValidateThis/ValidateThis repo will be the true primary repo for the project, then wouldn't it make sense to show an example pull request into ValidateThis:develop from bobsilverberg:develop, rather than the reverse (which is what you have pictured)?
Thanks again for putting the time into this fantastic resource!
The tests I did showed merge commits when pulling from another remote, but I was doing testing of a collaborative workflow, so I may not have tried that simple case of pulling when there are no changes at all in the local repo. I just tested and you are correct - if there have been no changes in a branch and you do a pull to bring in changes from upstream then it doesn't add a merge commit.
So I suppose if the workflow is that you make all of your changes in a branch, and only merge them back into develop when you are ready to push them to your own remote, then there is no need for a git pull --rebase. Things start to get complicated though - even more complicated than I anticipated with my document, when you need to make changes after that.
Adam and I have been working on a bunch of changes that he made, and we were both pulling from each other, so I'm not sure how often it's going to be a case of "make changes in a branch, merge into develop, push, and that's it". We ended up using additional branches to collaborate it, and it worked pretty well, but would have gotten quite complicated if there was a third developer in the mix.I'm thinking, though, that perhaps the safest thing to do it forget about git pull --rebase, even though it is cool, and just accept the fact that there may be unnecessary merge commits from time to time. I'm not too bothered by the commit history containing those. Does that sound like the best route to you?
You're not the only one to comment on that. I got some great feedback from Mike Henke which caused me to make the location of the "rules" more consistent. They now each appear immediately after the code example that they refer to. But I can see how it might still be confusing. I'm not sure how to make it better, though. Your comment about "maybe just bold text at the same font size as normal content" - that's what they are now. Maybe they don't appear that way, but they're just normal text wrapped in a <strong>. Do you have any other suggestions that make make it more readable/understandable?
A number of people have suggested breaking it up into smaller pieces. I know it's very long, as tends to be my want, but I also thought that if it was meant to be a "guide" then it should all be on one page to save people from having to click around.
I think I may release it to my blog in a few pieces, but have a link back to the whole document as well (as someone suggested - I can't remember who - maybe John?)
I'll try a few more experiments to see if I can simulate a workflow
with this that doesn't cause problems.
By the way, thanks so much for all of your valuable feedback Jamie.
Sorry I've been a bit busy to reply to each one.
Cheers,
Bob
Did you experiment with this option? I did and found issues, but I
might have had too many variables in play. It was the first thing I
tried, as it made the most sense to me too, but I ended up getting
strange conflicts that I didn't understand when I did this.
By the way, thanks so much for all of your valuable feedback Jamie.
Sorry I've been a bit busy to reply to each one.
so after a week of making furious changes to the
framework, while bringing myself up to speed on github, mxunit, bob's new
project workflow, and keeping two remote
development machines in sync... all at the same time.. .. I should probably just admit that I have broken every one of Bob's
rules at some point this week..
The main problems that still stand out for me right now include (but are not
limited to):
1. working off of my develop branch directly...
a. there is no real excuse here, but I would like to
explain why I did this the way I did,:
I split my development time
between two machines daily... It was hard to make all the changes i wanted and
need to make, while follow the workflow, and keeping the dev machines in sync..
2. I did not use git --rebase once :-/
a. i did do a lot of work on feature-branches, but I did alot
of "$git merge --no-ff bob/adam_develop" && "$git
merge --no-ff feature-[name]" on develop.
b. i pushed and merged my remote branches often (at some points, I may have even pushed incomplete or not working code to my remote so could pull it and pick up exactly where I left off on my *2nd machine)
c. I got a gut feeling that I shouldn't squish all of my commits,
this way any other contributor can see exactly what I've done and where I'm at,
and also so that I could retrace all my steps in some complex branching
situations where I at one time had 3 different branches I was doing work in
that utimately needed to come down to develop.
d. I'm also not sure how we will be able to really collaborate if
we keep squashing exactly what we are doing during our individual development..
I can the need to do this when pushing to the Framework master or release
branchs..
e. then again there, are two sides to every coin and maybe I will
make a stupid comment or coding mistake that I don't want the rest of the team
to see...
I guess what I'm trying to say here is that we really need to be careful when
setting up the rules/guidelines for our
collective git workflows... It will come with trial and error that we figure
out exactly what will be the ideal workflow for the team
Also, thanks for all the insight that you've provided here Jaime. and thanks to
Bob for all the patience he had with me this week.
Happy Weekend,
Adam.
This was a good chance to test out aspects of the workflow, but it was
also not done in a manner in which I would hope things would happen in
the future. I do agree that there are probably flaws in my proposed
workflow, and we're going to have to find and fix those as we go
along.
I will address your individual points below, but start by discussing
why I think this experience was different that what I had envisioned.
The workflow I described is aimed at adding small features and bug
fixes. You identify one thing you want to do, you implement it, and
you send your pull request. What Adam and I did, on the other hand
was work through some submitted changes that impacted many different
areas, and were also both incomplete and buggy. This is not meant as
any sort of criticism of you or your code, Adam. I just want to point
out that it's not the way I imagined folks using the workflow.
So given that a single pull request affected dozens of files in
numerous ways, and a lot of back and forth was required to identify
bugs and missing functionality, I don't think it was a good test of
the proposed workflow. Again, I do agree that the proposed workflow
isn't perfect, but I also think that we might want to try it out again
on a much smaller scale, such as a bug fix or adding an individual
feature.
Now let me respond to your note...
On Fri, Sep 10, 2010 at 7:40 PM, adam drew <epn...@gmail.com> wrote:
> so after a week of making furious changes to the framework, while bringing
> myself up to speed on github, mxunit, bob's new project workflow, and
> keeping two remote development machines in sync... all at the same time.. ..
> I should probably just admit that I have broken every one of Bob's rules at
> some point this week..
>
> The main problems that still stand out for me right now include (but are not
> limited to):
>
> 1. working off of my develop branch directly...
> a. there is no real excuse here, but I would like to explain why I did
> this the way I did,:
> I split my development time between two machines daily... It was
> hard to make all the changes i wanted and need to make, while follow the
> workflow, and keeping the dev machines in sync..
>
I too ended up working off of a sort-of development branch. I created
a branch called adam_develop which coincided with Adam's develop
branch, and I made all of my changes there. I didn't create feature
branches off of that. I think part of the reason was that I just
didn't see the proposed workflow as applicable to this situation. I
just wanted to try to get something working and stable asap.
As for the two machines issue, you could still use feature branches
and just push and pull those to and from the two machines, couldn't
you?
> 2. I did not use git --rebase once :-/
> a. i did do a lot of work on feature-branches, but I did alot of "$git
> merge --no-ff bob/adam_develop" && "$git merge --no-ff feature-[name]" on
> develop.
>
I did use git rebase from time to time, but I also used merge. I was
concerned because of all the pushing and pulling that was going on
that rebase might be dangerous. Again, I wasn't concerned too much
with following the rules on this one.
>
> b. i pushed and merged my remote branches often (at some points, I may
> have even pushed incomplete or not working code to my remote so could pull
> it and pick up exactly where I left off on my *2nd machine)
>
This was necessary as we were both working on the exact same code.
That's not really what the workflow is aimed at. I think that if two
developers need to work on the exact same feature then some changes
are required - probably creating a new, shared branch that gets pushed
to remotes. Possibly even a single shared branch that lives on the
main repo.
> c. I got a gut feeling that I shouldn't squish all of my commits, this
> way any other contributor can see exactly what I've done and where I'm at,
> and also so that I could retrace all my steps in some complex branching
> situations where I at one time had 3 different branches I was doing work in
> that utimately needed to come down to develop.
>
The idea of git rebase -i to squash commits is really about committing
often, like every 30 minutes or so (or even more), and then squashing
commits that are really one unit of work. I do not want people to
squash commits that will hide history. I think each piece of work
should have its own commit, but let's say you are doing some work and
it takes you a couple of hours to complete one feature. Let's also say
you commit every 30 minutes, just because it's a good idea. You then
have 3-4 commits which are all about the same piece of work - it just
happened to take you a couple of hours to complete it. Perhaps some of
those commits represent incomplete work - maybe some tests are
failing. Those are the commits that I think it is worthwhile to
squash.
Does that make sense and does that address your concern about
squashing commits? Maybe the way I describe it in the document makes
it sound different than I just described above.
> d. I'm also not sure how we will be able to really collaborate if we keep
> squashing exactly what we are doing during our individual development.. I
> can the need to do this when pushing to the Framework master or release
> branchs..
>
See above. And also I think this relates to the need to have different
workflows for individual development versus collaborating on a
feature. If you compare this to the way you'd do it with SVN, ask
yourself: how often would you commit to SVN? Would you do it
frequently to protect yourself, or would you wait until an entire
feature was complete before committing? If the latter then I suggest
that you can commit more often using Git, but still end up with larger
commits in the repo as you would have had with SVN.
One other note on this, based on my own experience of this week: For
the most part I did not look at your commits, I only looked at the
changes to the files when I had a pull request. The GitHub pull
request system is amazing for this - it shows you every file that
changed and all of the changes. I found this invaluable as I don't
have a decent tool to do this locally yet. So going back to your
comment that it will be hard to collaborate if a developer squashed
their commits - that would not have affected me at all. I do agree (as
I've stated above) that I don't think that commits that relate to
different changes should be squashed together, but I also wanted to
point out that even if you had squashed all of the commits that went
into a single pull request together it wouldn't really have affected
me personally.
> e. then again there, are two sides to every coin and maybe I will make a
> stupid comment or coding mistake that I don't want the rest of the team to
> see...
>
Yes, another advantage to committing often and rebasing.
> I guess what I'm trying to say here is that we really need to be careful
> when setting up the rules/guidelines for our collective git workflows... It
> will come with trial and error that we figure out exactly what will be the
> ideal workflow for the team
>
I agree 100%. I am totally open (contrary to how it may sound from my
response) to making changes to the workflow and/or the "rules" as we
discover what works and what does not work.
> Also, thanks for all the insight that you've provided here Jaime. and thanks
> to Bob for all the patience he had with me this week.
>
I second the thanks to Jamie, and Adam it was my pleasure. For those
of you you have no idea what Adam and I were up to (which I'm assuming
is all of you), Adam did a ton of work not only on new features he
added but on cleaning up a lot of stuff, and coming up with an
improved way of testing SRVs.
> Happy Weekend,
> Adam.
>
Ditto,
Bob
Having said that, I don't want to create barriers to contributions, so
if some people don't feel up to writing tests for their contributions
I think we can live with that. I just means that someone else is going
to have to write them. It would certainly be better if people wrote
tests, preferably first, but I don't plan to make that a requirement
(not yet, anyway).
Running the tests prior to sending a pull request is a very good idea,
though, and I think that should be mandatory. With the work that Adam
did it should be very easy for anyone to run the suite of unit tests,
and I hope to make some changes to the tests to make it even easier.
How do people feel about that becoming a requirement? Is that too
harsh? Will it deter any of you from contributing (just the running
of the tests, not having to write tests for new stuff)?
Cheers,
Bob
People can waste a lot of time -- theirs and yours -- if they jump in
, start coding, then say "oh, huh, I better run tests", and then they
get all manner of red and start banging down your door.
Ergo: baseline green should be a requirement. It's your cover charge,
so to speak.
Bob: "How many tests passed?"
New Contributor: "All of them"
Bob: "How many?
NC: "All. yeah. All, Right?"
Bob: "Give me a number!"
NC: "what?"
Bob: "Say what one more time"
.....
On Fri, Sep 10, 2010 at 9:59 PM, Bob Silverberg
git fetch upstream developgit rebase upstream/develop
--
You received this message because you are subscribed to the Google Groups "ValidateThis-dev" group.
To post to this group, send email to validate...@googlegroups.com.
To unsubscribe from this group, send email to validatethis-d...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/validatethis-dev?hl=en.