-
-
Notifications
You must be signed in to change notification settings - Fork 381
Novice-level lesson on branching in Git #471
Conversation
Changed the list order in a way where it followed logically, pedagocially.
An option not enumerated by @dtrap is to leave things as is: have the students branch and merge from the command line, and give no special discussion as to the different types of merges and history and whatnot. That could leave them uninformed about the mess of things they may encounter in the future, but we probably don't have time to cover all that. |
On Mon, Apr 28, 2014 at 10:40:33PM -0700, Dani Traphagen wrote:
Branches allow you factor a large change into a series of small
Since the novice lesson is already using GitHub, I think the On a more detailed level:
|
<div class="out" markdown="1"> | ||
~~~ | ||
* master | ||
shelter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This branch is shelter_plan
above. Shows up as shelter
here and a couple spots below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, thank you for pointing that out, this was a last minute branch name change so that the .txt file name and branch name being the same wouldn't confuse the students. I will fix this.
Added suggested fixes/feedback from @jiffyclub and @wking
--- | ||
|
||
#####Objectives: | ||
* Explain what branches and why they are helpful for individual and collaborative workflows. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Explain what branches are"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
|
||
* **Branching** is a way for you to create a new working copy of a project without affecting the main project. | ||
|
||
#####Benefits of branching: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, lose the sub-sub heading - I think you can go straight into the paragraph below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
~~~ | ||
git add shelter.txt | ||
git commit | ||
git push origin shelter_plan |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A mistake I keep making here is "git push origin master" instead of "git push origin branchname". Would a short discussion of the "git push" arguments be helpful/appropriate here?
I'm fairly new to branching myself and wish I'd had this lesson a few months ago! I think you cover the bascis well. Agreed that fast-foward vs regular merging seems too complex for this level. |
Can this one please be updated and then merged in before #759 ? |
@dtrapezoid, I'm sure you're pretty busy now. Think you'll get a chance to work on this anytime soon? |
@jiffyclub Hey Matt! Yes, that is true, I am going hard right now on the new job. I'll update the changes I have so far this Saturday, but I think I'll have to delegate the images changes on the screenshots due to copyright issues to someone else. Those images could simply be cropped out of the screenshots and overlayed as a quicker approach to redoing the process. I haven't yet pushed up all the changes I commented on, so a lot of work has been done already to correct the changes @gvwilson suggested. I will do that this Sat. and see what else I can get through too. I'm thinking carving out a few hours Saturday around 3pm if you have time to chat then. |
Relocated at swcarpentry/git-novice#225 |
Adding a lesson on branching for novice git users. Kept it as simple as could be, introducing the basic branching commands only. I am on the fence about how to resolve the lesson so I would love to have feedback on the following-
Update 5/1: Upon discussing the options went with teaching a PR on GitHub proper for the resolution to the lesson.
Resolving the lesson:
In line 155, I introduce merging. This will be problematic in the command line with the fast-forward vs. regular merge issue. To address this there are a few options.
git log --oneline --graph
so they can have a nice visual at the end showing their history in the command line. I personally think this is the best option.Any feedback on the rest of the lesson is welcome, tried to keep it consistent with Greg's lessons using the Monster Mash story line.