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 that directory, 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 --oneline
.
Copy and paste all of the Terminal text from this process below (not just the history):
jasminehamou@Jasmines-MBP ~ % pwd
/Users/jasminehamou
jasminehamou@Jasmines-MBP ~ % cd desktop
jasminehamou@Jasmines-MBP desktop % cd 0Mod
jasminehamou@Jasmines-MBP 0Mod % mkdir git_cfu
jasminehamou@Jasmines-MBP 0Mod % cd git_cfu
jasminehamou@Jasmines-MBP git_cfu % touch thoughts.md
jasminehamou@Jasmines-MBP git_cfu % git init
Initialized empty Git repository in /Users/jasminehamou/Desktop/0Mod/git_cfu/.git/
jasminehamou@Jasmines-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)
jasminehamou@Jasmines-MBP git_cfu % git add thoughts.md
jasminehamou@Jasmines-MBP git_cfu % git commit -m "Initial commit"
[main (root-commit) 18dd5b2] Initial commit
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 thoughts.md
jasminehamou@Jasmines-MBP git_cfu % git status
On branch main
nothing to commit, working tree clean
jasminehamou@Jasmines-MBP git_cfu % git diff
jasminehamou@Jasmines-MBP git_cfu % code .
jasminehamou@Jasmines-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")
jasminehamou@Jasmines-MBP git_cfu % git diff
diff --git a/thoughts.md b/thoughts.md
index e69de29..c9d8ffc 100644
--- a/thoughts.md
+++ b/thoughts.md
@@ -0,0 +1,3 @@
+# My Two Takeaways
+1. It's all new and scary, but if you take the time, it'll make sense.
+2. Have caffeinated beverages/food handy!
\ No newline at end of file
jasminehamou@Jasmines-MBP git_cfu % add thoughts.md
zsh: command not found: add
jasminehamou@Jasmines-MBP git_cfu % git add thoughts.md
jasminehamou@Jasmines-MBP git_cfu % git commit -m "Add two takeaways"
[main 1cd762e] Add two takeaways
1 file changed, 3 insertions(+)
jasminehamou@Jasmines-MBP git_cfu % git status
On branch main
nothing to commit, working tree clean
jasminehamou@Jasmines-MBP git_cfu % git add thoughts.md
jasminehamou@Jasmines-MBP git_cfu % git commit -m "Add two strategies"
[main c6f0d34] Add two strategies
1 file changed, 4 insertions(+), 1 deletion(-)
jasminehamou@Jasmines-MBP git_cfu % git status
On branch main
nothing to commit, working tree clean
jasminehamou@Jasmines-MBP git_cfu % git add thoughts.md
jasminehamou@Jasmines-MBP git_cfu % git commit -m "Add shout out"
[main 12cc6ba] Add shout out
1 file changed, 3 insertions(+), 1 deletion(-)
jasminehamou@Jasmines-MBP git_cfu % git log --oneline
12cc6ba (HEAD -> main) Add shout out
c6f0d34 Add two strategies
1cd762e Add two takeaways
18dd5b2 Initial commit
jasminehamou@Jasmines-MBP git_cfu %
Please respond to the following questions in writing directly in this Gist.
- How confident do you feel in your understanding and fluency with the Git workflow? I understand and can use the commands and the workflow covered, but would still like some feedback on my commit comments to make sure they meet the criteria.
- What do you still need to practice or learn? How will you do that? I still need some practice with commit commands, ensuring that they are concise but also include needed information. I hope that by learning more about Git, I'll get further exposure and examples. If needed, I'll practice during the time set aside on my calendar and reach out to my small group for feedback on my comments.
- What part of the Git Workflow is still confusing for you? I'm still a little confused on the git init command. I know that you use it at the creation of a directory, but am not fully sure the purpose of it.