CAREFULLY READ ALL THE INSTRUCTIONS BEFORE STARTING THESE EXERCISES!
To start this assignment:
- Click the button in the upper right-hand corner that says Fork. This is now your copy of the document.
- Click the Edit button when you're ready to start adding your answers.
- To save your work, click the green button in the bottom right-hand corner. You can always come back and re-edit your gist.
Read this article on git commit messages
- Your key take-aways OR how you're going to implement specific points (minimum 2):
- Chris talked about how programming lenguages have well-established conventions as to what constitutes idiomatic style, i.e. naming formating and so on. But, he made it really clear how sticking to one convention is more organized and productive. This strategy is specifically useful in a team environment because it lets everyone be on the same page.
- Keeping git commit messages simple yet informative is the best way to keep track of all changes. Again, this is true in a collaborative enviroment and for personal use since it'll be easier to know what and why something happened.
What's the use of the staging area in git? on Stackoverflow (15 min)
The idea of the staging area is frequently one of the trickiest concepts to wrap your head around when you're first learning git. Read the question and answers (or do your own Googling on the git staging area). Then, create your OWN metaphor comparing the staging area to something in real life.
- Type your metaphor below: The staging area in Git works similarly to a UPS distribution center. Packages get labeled and staged to be shipped out to wherever they need to go. All packages are staged in a big warehouse from where they can get loaded via dock into a semi. In the warehouse, the packages can get split up by addresses and determine where they need to go. Keeping packages in the warehouse helps review information (i.e. addresses, names, and what is being sent out) and keep track of changes being made to said information before being shipped or “commited”. Staging the packages in the warehouse helps identify problems with said packages (e.g. damaged or broken boxes boxes), keeps them around if said problems arise and permits for small fixes before shipping or “committing”.
Follow the steps below to practice the git workflow. Be ready to copy-paste your terminal output as confirmation of your practice.
- Create a directory called
git_homework. Inside of there, create a file calledthoughts.md - Initialize the directory
- Use
git statusto ensure you are set up for tracking using Git - Add your
thoughts.mdto the staging area - Check the
git status - Create an initial commit (Note: Be sure to follow the correct message format for your first commit!)
- Check the
git status - Add two takeaways you've had from your first few classes of Mod 0 as it relates to success at Turing.
- Check the
git status - Check the changes you've made using
git diff - Add the changes to the staging area
- Commit the new changes (Note: Be sure to follow convention for commit messages!)
- Check the status
- Add two new strategies you are committed to trying during the rest of Mod 0 to
thoughts.md - Add the changes to the staging area
- Commit the new changes (Note: Be sure to follow convention for commit messages!)
- Add at least one shoutout to someone who has helped you, supported you, or just been a positive presence in the last two weeks!
- Add the changes to the staging area
- Commit the new changes (Note: Be sure to follow convention for commit messages!)
- Show the log of your work in
onelineformat usinggit log(This will likely require some Googling)
Copy and paste all of the terminal text from this process below (not just the history):
Last login: Wed Jul 21 20:56:23 on ttys000
/Users/richy $🛫cd
/Users/richy $🛫pwd
/Users/richy
/Users/richy $🛫mkdir git_homework
/Users/richy $🛫cd git_homework
/Users/richy/git_homework $🛫touch thoughts.md
/Users/richy/git_homework $🛫ls
thoughts.md
/Users/richy/git_homework $🛫git init
Initialized empty Git repository in /Users/richy/git_homework/.git/
/Users/richy/git_homework main $🛫git status
On branch main
No commits yet
Untracked files:
(use "git add <file>..." to include in what will be committed)
thoughts.md
nothing added to commit but untracked files present (use "git add" to track)
/Users/richy/git_homework main $🛫git add thoughts.md
/Users/richy/git_homework main $🛫git status
On branch main
No commits yet
Changes to be committed:
(use "git rm --cached <file>..." to unstage)
new file: thoughts.md
/Users/richy/git_homework main $🛫git commit -m "initial commit"
[main (root-commit) eb19c68] initial commit
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 thoughts.md
/Users/richy/git_homework main $🛫git status
On branch main
nothing to commit, working tree clean
/Users/richy/git_homework main $🛫atom thoughts.md
/Users/richy/git_homework main $🛫git status
On branch main
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: thoughts.md
no changes added to commit (use "git add" and/or "git commit -a")
/Users/richy/git_homework main $🛫git diff
diff --git a/thoughts.md b/thoughts.md
index e69de29..917f398 100644
--- a/thoughts.md
+++ b/thoughts.md
@@ -0,0 +1,2 @@
+breaking down problems into smaller pieces to understand end goal
+try figuring something out on my own before asking questions
/Users/richy/git_homework main $🛫git add thoughts.md
/Users/richy/git_homework main $🛫git commit -m "Add two takeaways for success at turing"
[main 952bf1b] Add two takeaways for success at turing
1 file changed, 2 insertions(+)
/Users/richy/git_homework main $🛫git status
On branch main
nothing to commit, working tree clean
/Users/richy/git_homework main $🛫atom thoughts.md
/Users/richy/git_homework main $🛫git status
On branch main
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: thoughts.md
no changes added to commit (use "git add" and/or "git commit -a")
/Users/richy/git_homework main $🛫git add thoughts.md
/Users/richy/git_homework main $🛫git commit -m "Add two new strategies for mod zero"
[main 9a409fa] Add two new strategies for mod zero
1 file changed, 2 insertions(+)
/Users/richy/git_homework main $🛫atom thoughts.md
/Users/richy/git_homework main $🛫git add thoughts.md
/Users/richy/git_homework main $🛫git status
On branch main
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
modified: thoughts.md
/Users/richy/git_homework main $🛫git commit -m "Add shoutout to help and support"
[main d28adc1] Add shoutout to help and support
1 file changed, 1 insertion(+)
/Users/richy/git_homework main $🛫git diff
/Users/richy/git_homework main $🛫git status
On branch main
nothing to commit, working tree clean
/Users/richy/git_homework main $🛫git log --pretty=oneline
d28adc1a7b5a5b8e489c814d0d3a9db1d8d545be (HEAD -> main) Add shoutout to help and support
9a409fa27637c3e388524354b106545c759cc423 Add two new strategies for mod zero
952bf1ba4611115f2e10a8cd940bb1aded78acdd Add two takeaways for success at turing
eb19c683ac74f468c9372f2b8251fc56fff31223 initial commit
IMPORTANT: Do NOT remove this git_homework directory. You will be using this directory during the next session.
Your task: create a "Plan for Mod 0" documenting your gameplan for success in Mod 0, using Markdown.
Markdown (.md) is the format all of your homework gists are written in.
Using this markdown cheatsheet, create a new gist of your own by clicking the New Gist button in the upper right-hand corner of the screen.
Also, images can be a little tricky in gists and Github - be sure to check out the drag-n-drop shortcut from the first answer on this Stack Overflow post!
In the box to title your Gist, be sure to use follow this format: firstName_lastName_mod_0_plan.md
NOTE: Remember to add a .md file extension to filename of your new Gist. Otherwise it will not register as markdown.
In addition to documenting your gameplan for success in Mod 0, incorporate each of the following features into your Gist:
- at least two headings of different sizes
- at least one numbered list
- at least one bullet point list
- at least one bold word/phrase
- at least one italic word/phrase
- at least one code block (in Javascript for Frontend or in Ruby for Backend)
- at least one inline code block (greyed text)
- at least one image
- ⚡️ TURN THIS SENTENCE INTO A LINK TO YOUR GIST ⚡️
Using the rubric below, assess how you did with these exercises. These are the same metrics your instructors will use to determine if you are prepared for Mod 1!
- I read carefully read ALL directions
- I completed all parts of the exercises (not including Extensions) to the best of my ability
- I used correct syntax, spacing and naming conventions
- I followed ALL formatting instructions
- I pushed myself out of my comfort zone and experimented/broke things to try to learn
- I spent no longer than 20-30 mins Googling a specific problem before asking for help
- I went back to the lesson to search for clarification before asking for help
If you have any questions, comments, or confusions that you would like an instructor to address, list them below:
Are you stuck on something? Here is the BEST way to ask for help:
- Start or reply in the thread with the problem you are facing. Be sure to follow the guidelines for asking questions below:
- I can explain what I am trying to do or accomplish
- I can what I have tried so far and/or what resources I've tried online
- I can describe specifically what I am stuck on
- I provided screenshots and/or code examples to give context
- If I provided short code examples, I used
inline code formattingfor single lines of code/error messages - If I provided larger blocks of code, I used a code snippet in the correct format (such as
.jsor.rb)
- If I provided short code examples, I used
- Usually, your classmates will be able to answer your question or point you in the right direction very quickly! If not, an instructor will reply within 24-48 hours