Full version out! http://zachbruggeman.me/github-for-cats/
GitHub For Cats
Because cats just wanna have forks.
Getting up and running:
You may stay laying down though, as you are a cat.
The best way to get started with GitHub is to create a GitHub account!
That was pretty easy. You’re now logged into your GitHub account, where you can do anything!
Before you tackle the code-y parts of GitHub, a great way to start is to find others' code. One way to find lots of cool projects is by checking out the Explore page. The projects featured here are all top-notch, so see what interests you! (Probably the shiniest ones.) You can also follow people, to see all of their activity. Maybe you want to follow this sharp fellow? Finally, once you find a project you like, you can "star" it, which makes code-writers feel really awesome about themselves. It's that same feeling you might get when a new can of tuna is opened. Slightly less fishy-smelling, though.
The lay of the land:
GitHub is split into a lot of pages. The first one we can look at is a repository. Let’s look at supercat9000’s repo.
You’ll notice a lot at first. You can see there’s one file, called fish.jpg. You’ll see it says “remixz authored 2 minutes ago”. I had to author this for supercat9000, because even though he is a super-cat, he was too lazy to make the fish. He did create an account though, which is a very super-cat like thing to do. I had to download the fish though, because super-cat fell asleep. Because I am a nice human companion, I think I’m going to help improve his code. This, in essence, is what git is all about!
The first thing I will do is create an issue. I think super-cat needs a picture of a cat toy. So, I will click the Issues button at the top of the page, and choose the New Issue button.
As you can see, I’ve filled out an issue. I’ve added a title, to quickly show what this is about. I also filled out the text, and added an image, which I did by dragging and dropping it in. I finally added a label, to let super-cat know this is an enhancement to his repository. I’ll click Submit new Issue, and I’ve filed the first issue!
Another thing I want to do for him is make him a README. I can do this by creating a “fork” of his repository, and then submitting him a “pull request.” Let’s walk through that now.
Forks for cats:
Unlike a real fork, this type of fork a cat can use. It’s pretty easy to make a fork. Just click the Fork button on the repository, wait a few seconds, and...
My own copy (or fork) of super-cat’s repo! Now I can help him out. GitHub can be edited in a variety of ways, but for ease of use, I’m going to use the built-in online file editor. To access this, click the document icon with the + symbol in it. You'll get a page that looks like this:
Now that I've done that, I'll just press Commit new file at the bottom, and I've added a README file to my fork.
Though there is now a new shiny README in my fork of the repository, this doesn’t help super-cat. Ideally, super-cat should have it back. So, I will open a pull request! A pull request lets you take code you’ve written in a forked repository, and send it back to the original. On my repository page, I will hit Pull request.
I’ve added a title and a description, to tell super-cat what this pull request is. I will hit Send pull request, and now super-cat can choose to merge it in!
Creating a repository:
Now, this has been fine and dandy, looking at other cats' work. However, you want to do your own stuff! Thankfully, you're reading this guide. Let's make a new repository. Press the Create a new repo button on the top of your browser, right next to your name. Enter any name and description you want, and make sure to check Initialize this repository with a README.
Well done! You now have your own repository. Now, let's add something to it.
Adding to your repository:
It turns out that along with being a super-cat, supercat9000 is also a poet. Sort of. He can add his own poems to his new repository, caticalpoems. Press the new file button like you did with the fork earlier, and write up something:
We'll commit the file, and you now have a poem!
Editing your repository:
It turns out supercat9000 made a mistake. He didn't space his lines enough. Thankfully, with the power of GitHub, we can change that. Click on the file, and choose Edit. You now have the same editor again, so make your changes:
And now super-cat has an awesome poem.
You now know the basics of GitHub! This is a very simple guide, as it is meant for you, a cat. GitHub, and git itself, can do a lot more. However, you now know a lot more than your neighborhood stray cat does. Feel good about that!
Feel free to try all of these demos on your own repositories, or on supercat9000’s. I’m sure he’d appreciate any help he could get.
- supercat9000's photo is from @maxogden's cats repository, as I am a dog owner. https://github.com/maxogden/cats
- This guide is based off of @maxogden's js-for-cats. Go Max!
- If you work at GitHub, thanks for making such an awesome site.
This is a rough draft, so any and all help and feedback is awesome. Once I feel this is more production-ready, I'll put up a site for it. Thank you!!