Welcome! This repo will show you how to become an honorary member of the annex, and will test your knowledge of Git/GitHub along the way.
Independently complete the steps below once you have finished the GitHub Ultimate course on Udemy. All of the steps should be completed from the command line in your interpreter of choice (iTerm2 is what the majority of the team at DAS42 uses) unless specified otherwise. Feel free to reach out to Logan with any questions you might have about this assignment.
- Fork this repo in GitHub.
- hint: Checkout the top right of the page.
- Open your CLI of choice (iTerm2, Terminal, etc.)
- In your
~/Desktop/
directory, create a new directory calledgit_knowledge_check
and move into it.- hint:
mkdir
cd
- hint:
- Once there, create another new directory named
forked_repo
and move into it.
- Hop back over to GitHub in your web browser.
- Clone your forked copy of this repo using SSH and move into it.
- hint: Review Session 7 of the Udemy training course.
- Create a new branch called
personal
, and switch to it.
- Edit the
jokes.md
file by adding your name and a joke in the existing format. - Stage and commit these changes and be sure to include a commit message.
- This can be done with one command.
- Push your local personal branch upstream to your remote repo.
- hint: If you try to accomplish this using
git push
alone, you will get an error. This is because your personal branch only exists locally, and doesn't yet have an upstream origin in your remote repo. To remedy this, you will need to initialize an upstream origin for your local person branch. Review Lecture 94 of the Udemy training course if you need a refresher on how to do this.
- hint: If you try to accomplish this using
- Check that your branch is up to date using
git status
.
- Look at the
collaborators.txt
file and remember who the last person listed is.- Don't make any edits to this file just yet.
- Hop over to GitHub in your web browser and create a pull request between your forked personal branch and the origin master branch
Das42/onboarding_git_knowledge_check
.
- Send Logan a message on Slack letting him know that you have created the pull request. Be sure to include the following things:
- your GitHub username
- the person who's name you saw at the end of the
collaborators.txt
file - a link to your forked copy of the original repo
- should look something like
https://github.com/YOURUSERNAME/onboarding_git_knowledge_check
- should look something like
- Once your pull request has been approved, and Logan has added you as a Collaborator, return to your CLI.
- Create a new directory in your
~/Desktop/git_knowledge_check/
directory calledorigin_repo
.- Your
~/Desktop/git_knowledge_check/
directory should now contain two directories:forked_repo
origin_repo
- Your
- Using the same method as Step 3 above, clone the origin repo from GitHub into
~/Desktop/git_knowledge_check/origin_repo
.- You should now have a local repo of the original repo in your
origin_repo
directory.- hint: It should look something like this:
~/Desktop/git_knowledge_check/origin_repo/onboarding_git_knowledge_check
- hint: It should look something like this:
- You should now have a local repo of the original repo in your
- Create a new branch, calling it your first name, and switch to it.
- Create a text file in your personal branch called
YOURNAME_two_truths_one_lie.txt
and populate it accordingly. - Stage this file and commit these changes.
- Be sure to include a commit message.
- Switch to your local master branch and make sure it is up to date with the upstream origin.
- If it is not, pull down the changes.
- hint:
git status
git fetch
git pull
- In the CLI, merge your local master branch with your FIRSTNAME branch.
- After doing so, push your local master branch up to the remote repo.
- Hop over to the master branch of the origin repo on GitHub and verify that:
- your unique
two_truths_one_lie
file is in the master branch - your joke is present in the
jokes.md
file in the master branch - your name appears in the
collaborators.txt
file
- your unique
- Message Logan once you've completed these steps.
- Await Curtis's approval of your joke (minimum of two chuckles required) and eagerly await your letter of acceptance as an honorary member of the annex.
- Pat yourself on the back, because you're done.