Get a copy of Push
To submit or contribute to Push, you need to get a copy of it. There are two parts to that: the first takes place on GitHub, and the second on your computer.
You only need to do this once.
Log into your GitHub account, and then go to the Push repository page.
Locate the Fork button in the upper right-hand part of your screen, and click it.
You’ll see a cute little animation from GitHub, reinforcing the idea that “forking” is basically just another word for copying.
When the forking process is complete, you’ll see at the top of your page an SSH URL, something that looks like
email@example.com:USERNAME/push.git, with your username instead of
USERNAME. Copy that URL to your operating system’s clipboard.
On Your Computer
You only need to do this once.
Fire up your command line (called Terminal in Mac and some Linuxes), and make sure that you’re in your home directory by running
$is just a convention for indicating the command-line prompt; you don’t actually type it. Also, be sure to always hit the Return or Enter key at the end of each line of command-line input.
Create a directory, called
Projects. It’s something of a convention to keep all Git repositories in a directory of that name, but you can choose another if you’d like.
$ mkdir Projects
then change into that directory:
$ cd Projects
Now you’ll get a copy of the Push repository that you can work on. Just as “forking” was the word for making a copy of Push on GitHub, “cloning” pulls down a copy of Push to your computer. Type
git cloneat the command line, and type or paste in the URL you copied in the last step in the GitHub instructions above. It’ll look something like:
$ git clone firstname.lastname@example.org:USERNAME/push.git
but you’ll see your username instead of the
USERNAMEin the example above.
When you hit return on that command, you’ll see some output not unlike:
Cloning into 'push'... remote: Counting objects: 657, done. remote: Compressing objects: 100% (338/338), done. remote: Total 657 (delta 312), reused 606 (delta 261) Receiving objects: 100% (657/657), 329.38 KiB, done. Resolving deltas: 100% (312/312), done.
If you get a message like “Permission denied (public key),” be sure that you have followed GitHub’s instructions for setting up SSH keys on your computer, and try the
git clonecommand above again.
To double-check that you have your copy, change into the Push directory where your copy is:
$ cd push
and then run the directory-listing command
ls -Fog, which will show you output similar to that below:
$ ls -Fog total 104 -rw-r--r-- 1 15 Oct 14 14:53 CNAME -rw-r--r-- 1 61 Oct 14 14:53 Gemfile -rw-r--r-- 1 1105 Nov 18 14:00 README.md -rw-r--r-- 1 139 Oct 29 18:15 _config.yml drwxr-xr-x 8 272 Nov 18 15:36 _includes/ drwxr-xr-x 6 204 Nov 18 15:29 _layouts/ drwxr-xr-x 3 102 Oct 14 14:53 _plugins/ drwxr-xr-x 5 170 Oct 29 18:15 _posts/ drwxr-xr-x 14 476 Nov 2 10:49 _site/ drwxr-xr-x 4 136 Oct 29 18:15 about/ drwxr-xr-x 5 170 Oct 25 13:14 assets/ drwxr-xr-x 4 136 Nov 13 13:40 blog/ -rw-r--r-- 1 1673 Nov 18 15:27 cfp.md drwxr-xr-x 4 136 Nov 13 13:40 contribute/ -rw-r--r-- 1 1907 Oct 29 18:15 index.md drwxr-xr-x 3 102 Oct 29 18:15 issues/ drwxr-xr-x 19 646 Nov 13 13:40 learn/ -rwxr-xr-x 1 40 Oct 14 14:53 serve.sh -rw-r--r-- 1 5735 Oct 29 18:15 style-guide.md drwxr-xr-x 3 102 Oct 29 18:15 submissions/
That’s just a listing of all the files and directories (those entries ending with a slash,
/) that make up Push’s source files.
One last check: if you run
$ git status, you’ll see a notice that you are on the
masterbranch, and a message stating that there is nothing to commit:
$ git status # On branch master nothing to commit, working directory clean
That message is enough to indicate that, in addition to receiving all of the files for Push, you also have a functioning Git repository to work within.
Now that you have your copy, it’s time to set up your workspace for your submission/contribution.