bu-cnso / git-introduction

A brief introduction to git and GitHub
1 stars 10 forks source link

Add Github fork-and-PR intro #2

Closed effigies closed 8 years ago

effigies commented 8 years ago

Lesson covers:

  1. Cloning
  2. Adding a remote
  3. Fetching and branching
  4. Stage/commit/push
  5. Opening a PR

Reviews welcome.

edeno commented 8 years ago

I can briefly talk about the Github Desktop Application at the end if you want. I alternate between command line and desktop.

Also worth mentioning things that are Github specific like:

effigies commented 8 years ago

Cool. Was thinking of this PR as a chance to comment on the existing content, and further lessons can be added as new PRs (or requested as an issue).

I can do the issue tracker thing, but I have basically no experience with the other two. Though I wish I'd known about the student developer pack so I could get the $50 DigitalOcean credit.

edeno commented 8 years ago

Alright. I opened it as issue #4. Also maybe this can serve as an example of using issues.

edeno commented 8 years ago

Oh, this is something I found useful with reference to this PR: https://onlywei.github.io/explain-git-with-d3/ is an interactive visualization of what git does when you make a commit, merge, rebase, etc.

effigies commented 8 years ago

Cool. Maybe I should add that as a link? Trying to walk people through it seems like it would take quite some time.

edeno commented 8 years ago

I think a link and a two second demo would suffice. It's also a good way for people to practice.

effigies commented 8 years ago

Okay. Might do it in the "Personal projects" topic I planned. I think a lot of that will come up more when you're messing with your own history from multiple machines than in feature branches.

effigies commented 8 years ago

What do you think of the summary section? Could just have a section like that in each topic.

edeno commented 8 years ago

I like the summary section. Are you suggesting a "commands used in this section" for each section?

effigies commented 8 years ago

If by "section" you mean files like "github_model.md", then yes. If you mean those subheadings like Starting a Branch and Making a Pull Request, no. Follows too close on the actual presentation, so it wouldn't add much.

edeno commented 8 years ago

Oh I see what you mean. Regardless --- I like the idea of summarizing commands used. How many separate markdown files are you planning on?

effigies commented 8 years ago

2 at least, since I've already thought of them. No more than 4, I think, since we only have so much time. The organizing principle I've been going with is workflows.

effigies commented 8 years ago

Also, what's your feeling then: More frequent summaries? An overall summary, outside these individual topic files? Or good as is?

edeno commented 8 years ago

Thinking about it some more, it seems like there should be a summary of the commands used at the end of each subsection as well as at the end.

My reasoning for this is it's hard to tell what commands are used if you're not used to the command line. I would also suggest meaningful code highlighting for the command line blocks, but my quick search didn't reveal anything useful in that regard.

effigies commented 8 years ago

Yeah, I tried

```bash


blocks, but that was no good. It basically colors `cd` and nothing else that I've written so far. Added sub-summaries. Let me know what you think.
edeno commented 8 years ago

Hmm, ShellSession seems to do some highlighting.

Example

$ git clone git@github.com:$USER/introduction.git
Cloning into 'introduction'...
remote: Counting objects: 21, done.
remote: Compressing objects: 100% (14/14), done.
remote: Total 21 (delta 3), reused 0 (delta 0), pack-reused 3
Receiving objects: 100% (21/21), 15.75 KiB | 0 bytes/s, done.
Resolving deltas: 100% (3/3), done.
Checking connectivity... done.
effigies commented 8 years ago

Well that's... very slightly better.

edeno commented 8 years ago

Shrug, at least it separates the command from the shell output.

I like the new changes.

All of this is going to be a lot of information for people to take in, but it's good for people to have a document to keep referring to.

One thing I'm worried people won't understand is the difference between git and Github. I certainly was confused about it until I started using both more.

There's also basic things like "what is the command line?", "What is an ssh key?", etc. that I'm sure people will be stuck on.

effigies commented 8 years ago

Yeah, it's definitely a lot. Do you think I should cut back on the command output? Might reduce clutter and mental load. I added it, thinking it would be good to see that some of that mess is expected and perfectly fine.

edeno commented 8 years ago

I would say leave it. There's a possibility it would be slightly less intimidating without it, but you shouldn't overdo working on this. You're already doing a ton. People can modify it in the future to make it more clear.

As long as you go slowly while teaching it, this will be a good reference.