- Apply your GitHub command line skills
- Create a remote repository on GitHub and connect it with a local folder
It's time to test our GitHub repository creation skills! Before you dive into
the instructions, in your terminal, run learn
from the main lesson folder.
You should see a series of messages appear; these are the tests that must be
passed. As you follow the instructions below, continue to run learn
in your
terminal to see your progress. As you complete the steps, you should see that
more and more of the tests pass, until all tests have been completed.
Here's a reminder the workflow for completing the lab:
- Run
learn
. - Read the tests and errors.
- Write code; repeat steps 1 and 2 often until a test passes.
- Repeat as needed for further tests.
- Run
learn submit
when finished!
Note: You must be in the parent folder of this lesson to run the tests, so
if, you navigate into a new folder, make sure to use cd ..
until you're back
in the git-remote-code-along
folder before running learn
.
As with most labs you'll encounter during this course, details will be minimal on how to complete the deliverables. Make sure to use the tests to check your progress, and read the messages, as they will provide clues regarding how to pass them.
- Create a new folder locally called 'my-repository',
cd
into the new folder - Use the terminal to initialize a new git repository
- Create a README.md file inside your new folder
- Create a remote repository on GitHub, using your GitHub account
- Set the newly created GitHub repository as the remote repo for your new local repository
- Use the terminal to add your README.md so it is tracked by git, and commit
(don't forget to add
-m
when committing to include a message!)
Note: If you forget to include -m
on when committing, you'll find you've
opened vi, the built in terminal text editor. To escape out of this editor,
press the 'esc' key once, then type :x!
to close the editor and return to the
normal terminal.
- Push up your local work to the remote
If you've passed all of the tests, run learn submit
to register
completion of this lab in learn. As you become more comfortable with the
terminal and git, you'll find yourself using the workflow of initializing,
adding, committing and pushing your work on a regular basis.
Remember: Commit, and commit often!
View Git Remotes + GitHub Code-Along on Learn.co and start learning to code for free.