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 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 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
onelineformat usinggit log(This is new, yep!)
Copy and paste all of the Terminal text from this process below (not just the history):
/Users/michaelmarchand/Documents/Turing $cd git_homework
cd: no such file or directory: git_homework
/Users/michaelmarchand/Documents/Turing $mkdir git_homework
/Users/michaelmarchand/Documents/Turing $cd git_homework
/Users/michaelmarchand/Documents/Turing/git_homework $
touch thoughts.md
/Users/michaelmarchand/Documents/Turing/git_homework $
git init
Initialized empty Git repository in /Users/michaelmarchand/Documents/Turing/git_homework/.git/
/Users/michaelmarchand/Documents/Turing/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/Users/michaelmarchand/Documents/Tur/Users/michaelmarchand/Documents/Turing/git_homework main $clear
/Users/michaelmarchand/Documents/Turing/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/michaelmarchand/Documents/Turing/git_homework main $git add .
/Users/michaelmarchand/Documents/Turing/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/michaelmarchand/Documents/Turing/git_homework main $git commit -m 'initial commit'
[main (root-commit) 9f2d0c8] initial commit
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 thoughts.md
/Users/michaelmarchand/Documents/Turing/git_homework main $git status
On branch main
nothing to commit, working tree clean
/Users/michaelmarchand/Documents/Turing/git_homework main $atom thoughts.md
/Users/michaelmarchand/Documents/Turing/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/michaelmarchand/Documents/Turing/git_homework main $git diff
diff --git a/thoughts.md b/thoughts.md
index e69de29..5a84d8f 100644
--- a/thoughts.md
+++ b/thoughts.md
@@ -0,0 +1,2 @@
+1. this is exciting stuff!
+2. terminal makes things faster!
\ No newline at end of file
/Users/michaelmarchand/Documents/Turing/git_homework main $git add .
/Users/michaelmarchand/Documents/Turing/git_homework main $git commit -m 'Adds new thoughts'
[main cdb9d57] Adds new thoughts
1 file changed, 2 insertions(+)
/Users/michaelmarchand/Documents/Turing/git_homework main $git status
On branch main
nothing to commit, working tree clean
/Users/michaelmarchand/Documents/Turing/git_homework main $git add .
/Users/michaelmarchand/Documents/Turing/git_homework main $git commit -m 'Adds new strategies'
[main 8aab0a2] Adds new strategies
1 file changed, 5 insertions(+), 1 deletion(-)
/Users/michaelmarchand/Documents/Turing/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/michaelmarchand/Documents/Turing/git_homework main $git add .
/Users/michaelmarchand/Documents/Turing/git_homework main $git status
On branch main
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
modified: thoughts.md
/Users/michaelmarchand/Documents/Turing/git_homework main $git commit - 'Adds kudos to positive influence'
error: pathspec '-' did not match any file(s) known to git
error: pathspec 'Adds kudos to positive influence' did not match any file(s) known to git
/Users/michaelmarchand/Documents/Turing/git_homework main $
medium confidence for understanding and fluency
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?
- practice/learn: additional commands available
- how to practice/learn: through experience and on an as-needed basis
- no
- none at this time
- ask
