Skip to content

Instantly share code, notes, and snippets.

@Tristinsorrells1
Forked from ameseee/git_cfu.md
Last active August 24, 2022 17:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Tristinsorrells1/b47aa40413e00cced34d91b5453e5b0b to your computer and use it in GitHub Desktop.
Save Tristinsorrells1/b47aa40413e00cced34d91b5453e5b0b to your computer and use it in GitHub Desktop.

Git - Check For Understanding

To start this assignment:

  1. Click the button in the upper right-hand corner that says Fork. This is now your copy of the document.
  2. Click the Edit button when you're ready to start adding your answers.
  3. To save your work, click the green button in the bottom right-hand corner. You can always come back and re-edit your gist.

Git Workflow

Follow the steps below to practice the Git workflow. Be ready to copy-and-paste your Terminal output as confirmation of your work.

  1. Create a directory called git_cfu. Inside of there, create a file called thoughts.md
  2. Initialize the directory
  3. Use git status to ensure you are set up for tracking using Git
  4. Add your thoughts.md to the staging area
  5. Check the git status
  6. Create an initial commit (Note: Be sure to follow the correct message format for your first commit!)
  7. Check the git status
  8. Add two takeaways you've had from your first hours of Mod 0 as it relates to success at Turing.
  9. Check the git status
  10. Check the changes you've made using git diff
  11. Add the changes to the staging area
  12. Commit the new changes (Note: Be sure to follow convention for commit messages!)
  13. Check the status
  14. Add two new strategies you are committed to trying during the rest of Mod 0 to thoughts.md
  15. Add the changes to the staging area
  16. Commit the new changes (Note: Be sure to follow convention for commit messages!)
  17. Add at least one shoutout to someone who has helped you, supported you, or just been a positive presence in the last two weeks!
  18. Add the changes to the staging area
  19. Commit the new changes (Note: Be sure to follow convention for commit messages!)
  20. Show the log of your work in oneline format using git 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
:

Self Evaluation

  • 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment