An exercise in forking and creating a pull requests.
First, run through the below exercise to add your SSH key
- https://github.com/ga-wdi-lessons/git-ssh If you cannot get it to work, then use HTTPS for the below instructions (#2)
- Practice using the 'fork, clone, and pull request' model to submit assignments
You do not have the necessary rights to update this repository. Therefore, you must fork it, make changes to your fork, and then send a pull request to the owners of this repository.
- Fork this repo to your personal account.
- Copy the "SSH clone URL" for your fork of this repo.
- This is where the SSH or HTTPS links come into play
Starting in ~/wdi/exercises:
- Clone the repository to your computer (make sure to use the url for your fork, and not this original repo), e.g.
git clone firstname.lastname@example.org:adambray/haiku.git. Note: The
git clonecommand will create a new "haiku" dir and copy the repo into it.
- Change to the newly created "haiku" dir (
- You can see that the clone command has already setup your origin (
git remote -v).
- Open the current directory in your text editor (
- Create a text file named
- Write a haiku on a topic of your choice, commit it and push it.
- Make one more commit that removes your Haiku.
- Undo the commit you just made. Thing to Google is "undo last commit". (Hint: use
- Push everything to your remote.
- You should still see your haiku on Github.
Create a Pull Request:
- Back on github.com (on your forked repo), create a pull request to the upstream (original) repository:
ga-dc/haiku master <- your_github_name/haiku master.
Additional changes are added to the Pull Request:
- Make additional local changes, and commit/push them to your remote.
- Verify that the pull request is updated on github.