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.
Follow the steps below to practice the Git workflow. Be ready to copy-and-paste your Terminal output as confirmation of your work.
- Create a directory called
git_cfu
. Inside of there, create a file calledthoughts.md
- Initialize the directory
- Use
git status
to ensure you are set up for tracking using Git - Add your
thoughts.md
to 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 hours 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
oneline
format usinggit log
(This is new, yep!)
Copy and paste all of the Terminal text from this process below (not just the history):
Last login: Wed Aug 24 11:44:45 on ttys000
turingmac@Tristinss-MBP ~ % mkdir git_cfu
turingmac@Tristinss-MBP ~ % cd git_cfu
turingmac@Tristinss-MBP git_cfu % touch thoughts.md
turingmac@Tristinss-MBP git_cfu % git init
Initialized empty Git repository in /Users/turingmac/git_cfu/.git/
turingmac@Tristinss-MBP git_cfu % 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)
turingmac@Tristinss-MBP git_cfu % git add thoughts.md
turingmac@Tristinss-MBP git_cfu % git status
On branch main
No commits yet
Changes to be committed:
(use "git rm --cached <file>..." to unstage)
new file: thoughts.md
turingmac@Tristinss-MBP git_cfu % git status
On branch main
No commits yet
Changes to be committed:
(use "git rm --cached <file>..." to unstage)
new file: thoughts.md
turingmac@Tristinss-MBP git_cfu % git commit -m "Initial commit"
[main (root-commit) 4459c8b] Initial commit
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 thoughts.md
turingmac@Tristinss-MBP git_cfu % git status
On branch main
nothing to commit, working tree clean
turingmac@Tristinss-MBP git_cfu % atom .
turingmac@Tristinss-MBP git_cfu % 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")
turingmac@Tristinss-MBP git_cfu % git diff
diff --git a/thoughts.md b/thoughts.md
index e69de29..59cd373 100644
--- a/thoughts.md
+++ b/thoughts.md
@@ -0,0 +1,2 @@
+I learned the basics of terminals
+I learned the basics of Git Workflow
turingmac@Tristinss-MBP git_cfu % git add thoughts.md
turingmac@Tristinss-MBP git_cfu % git commit -m "Mod0 takeaways"
[main fda696d] Mod0 takeaways
1 file changed, 2 insertions(+)
turingmac@Tristinss-MBP git_cfu % git status
On branch main
nothing to commit, working tree clean
turingmac@Tristinss-MBP git_cfu % git add thoughts.md
turingmac@Tristinss-MBP git_cfu % git commit -m "Strategies for mo0"
[main f49b86f] Strategies for mo0
1 file changed, 2 insertions(+)
turingmac@Tristinss-MBP git_cfu % git add thoughts.md
turingmac@Tristinss-MBP git_cfu % git commit -m "Postive presence"
[main 81b3014] Postive presence
1 file changed, 1 insertion(+)
turingmac@Tristinss-MBP git_cfu % git log
commit 81b3014c069c59a94e18b7e6dd042c12e44731e0 (HEAD -> main)
Author: Tristin Sorrells <Tristinsorrells1@gmail.com>
Date: Wed Aug 24 12:19:46 2022 -0500
Postive presence
commit f49b86fb6ff7bb398953162e6ea56628d0667f78
Author: Tristin Sorrells <Tristinsorrells1@gmail.com>
Date: Wed Aug 24 12:18:55 2022 -0500
Strategies for mo0
commit fda696dfe459d8a52a37f2d55312c8735179c57d
Author: Tristin Sorrells <Tristinsorrells1@gmail.com>
Date: Wed Aug 24 12:16:51 2022 -0500
Mod0 takeaways
commit 4459c8b07000987599a1d9cfb0e0f57bd3cab569
Author: Tristin Sorrells <Tristinsorrells1@gmail.com>
Date: Wed Aug 24 12:14:10 2022 -0500
Initial commit
:
- How confident do you feel in your understanding and fluency with the Git workflow? I feel pretty confident with Git worklow but will become stronger overtime with the help pf repetition
- What do you still need to practice or learn? How will you do that? Do you need to adjust your calendar in order to do that? I need to practice becoming more comfortable with these commands. I will do this by re-doing the challenge problems at the end of the lesson. I do not need to adjust my calendar to do that.
- What questions do you still have? How will you get the answers you need? For example 2 step 11, is it possible to use git add for the whole practice directory? Or is git add only able to add files? I will ask Ellen this during our small group time tonight.