From e2023536488a517fe34045996c11d462af70431f Mon Sep 17 00:00:00 2001 From: IsaiahCollazo99 Date: Tue, 24 Sep 2019 21:06:44 -0400 Subject: [PATCH 1/9] complete first problem --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 6629d35..bed6316 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ ## First Set 1. Create a new directory on your Desktop called git_exercises and cd into that directory. +mkdir git_exercises +cd git_exercises 2. Using `git init`, create a new repository. 3. Using the `touch` command, create empty files called foo and bar in your repository directory. 4. Enter `ls` to make sure they were added. From cb7e0da544f5e20624ef9e3b6007fc0714cb57fd Mon Sep 17 00:00:00 2001 From: IsaiahCollazo99 Date: Tue, 24 Sep 2019 21:09:49 -0400 Subject: [PATCH 2/9] Complete First Problem Markdown --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index bed6316..7250def 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,10 @@ ## First Set 1. Create a new directory on your Desktop called git_exercises and cd into that directory. +``` mkdir git_exercises cd git_exercises +``` 2. Using `git init`, create a new repository. 3. Using the `touch` command, create empty files called foo and bar in your repository directory. 4. Enter `ls` to make sure they were added. From 98ca1104277afa478f027ea813a219d7a6d9bea3 Mon Sep 17 00:00:00 2001 From: IsaiahCollazo99 Date: Wed, 25 Sep 2019 20:41:34 -0400 Subject: [PATCH 3/9] complete foo steps --- README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/README.md b/README.md index 7250def..51915fe 100644 --- a/README.md +++ b/README.md @@ -7,15 +7,39 @@ mkdir git_exercises cd git_exercises ``` 2. Using `git init`, create a new repository. +``` +git init +``` 3. Using the `touch` command, create empty files called foo and bar in your repository directory. +``` +touch foo +touch bar +``` 4. Enter `ls` to make sure they were added. +``` +ls +``` 5. Check your `git status`. +``` +git status +``` 6. Using `git add foo`, add `foo` to the staging area. Confirm with `git status` that it worked. +``` +git add foo +git status +``` 7. Using `git commit -m` add an appropriate message, add foo to the repository. +``` +git commit -m "add foo" +``` 8. Check your `git status`. +``` +git status +``` 9. Using `git add bar`, add bar to staging area. Confirm with git status that it worked. 10. Now run `git commit -m` option, and add the message `“Add bar”`. 11. Using `git log`, confirm that the commits made in the previous exercises worked correctly. + ## Second Set From fa77859d2138e0f72bc66ab6f4db898be872aace Mon Sep 17 00:00:00 2001 From: IsaiahCollazo99 Date: Wed, 25 Sep 2019 20:43:03 -0400 Subject: [PATCH 4/9] add bar --- README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 51915fe..ce7ef86 100644 --- a/README.md +++ b/README.md @@ -37,8 +37,18 @@ git commit -m "add foo" git status ``` 9. Using `git add bar`, add bar to staging area. Confirm with git status that it worked. -10. Now run `git commit -m` option, and add the message `“Add bar”`. +``` +git add bar +git status +``` +10. Now run `git commit -m` option, and add the message `“Add bar”` +``` +git commit -m "add bar" +``` 11. Using `git log`, confirm that the commits made in the previous exercises worked correctly. +``` +git log +``` From 5bb76bd524ce8e9de180907a050008ebcee9b062 Mon Sep 17 00:00:00 2001 From: IsaiahCollazo99 Date: Wed, 25 Sep 2019 20:52:01 -0400 Subject: [PATCH 5/9] Create Baz --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index ce7ef86..3fb16df 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,13 @@ git log ## Second Set 1. Use touch to create an empty file called baz. +``` +touch baz +``` 2. Check that it's there by entering `ls`. +``` +ls +``` 3. Check the status of your git. 4. Add baz to the staging area using `git add .`, then commit with the message `"Add bazz"`. 5. Realizing there’s a typo in your commit message, change bazz to baz using `git commit --amend -m Add baz`. From 7980990426b29214dfeda3ce7fe7ee5f4b532b1b Mon Sep 17 00:00:00 2001 From: IsaiahCollazo99 Date: Wed, 25 Sep 2019 20:57:18 -0400 Subject: [PATCH 6/9] complete Set Two --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index 3fb16df..faaafec 100644 --- a/README.md +++ b/README.md @@ -63,9 +63,22 @@ touch baz ls ``` 3. Check the status of your git. +``` +git status +``` 4. Add baz to the staging area using `git add .`, then commit with the message `"Add bazz"`. +``` +git add . +git commit -m "Add bazz" +``` 5. Realizing there’s a typo in your commit message, change bazz to baz using `git commit --amend -m Add baz`. +``` +git commit --amend -m add baz +``` 6. Run git log to get the id of the last commit, then view the diff using `git show ` to verify that the message was amended properly. +``` +git show 27540765abd2b2d2664367c003cfa1678dcc697b +``` ### Third Set From a6b8cfc8f12feea2bde55531383ac3f13e0a2184 Mon Sep 17 00:00:00 2001 From: IsaiahCollazo99 Date: Wed, 25 Sep 2019 21:14:35 -0400 Subject: [PATCH 7/9] complete Third Set, 1 & 2 --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index faaafec..8282663 100644 --- a/README.md +++ b/README.md @@ -83,7 +83,16 @@ git show 27540765abd2b2d2664367c003cfa1678dcc697b ### Third Set 1. The `git log` command shows only the commit messages, which makes for a compact display but isn’t particularly detailed. Verify by running `git log -p` that the `-p` option shows the full diffs represented by each commit. Press `q` to escape. +``` +git log -p +q +``` 2. Create a file `README.md`, add and commit it. +``` +touch README.md +git add README.md +git commit -m "create README" +``` 3. Got to github and create a new repository. Connect your local repo to the remote one. 4. Open your README.md and and add the line `# hello there` at the top of `README.md` and save. 5. Check the status, then add, check the status, and then commit the new line with a commit message of your choice. Verify using `git status` that the change was committed as expected. From 4fe83503628310c9f07320f0aa3babb092e00b0c Mon Sep 17 00:00:00 2001 From: IsaiahCollazo99 Date: Wed, 25 Sep 2019 21:19:01 -0400 Subject: [PATCH 8/9] complete third set --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index 8282663..fcf2194 100644 --- a/README.md +++ b/README.md @@ -94,8 +94,21 @@ git add README.md git commit -m "create README" ``` 3. Got to github and create a new repository. Connect your local repo to the remote one. +``` +git remote add origin https://github.com/IsaiahCollazo99/Homework2.git +``` 4. Open your README.md and and add the line `# hello there` at the top of `README.md` and save. +``` +code . +``` 5. Check the status, then add, check the status, and then commit the new line with a commit message of your choice. Verify using `git status` that the change was committed as expected. +``` +git status +git add . +git status +git commit -m "add Hello There" +git status +``` 6. Push your changes: `git push origin master`. Refresh your github and click on the commit to verify the changes. ### Fourth Set From ad89c9ed2900cd18861be8588e84658c4d067fc4 Mon Sep 17 00:00:00 2001 From: IsaiahCollazo99 Date: Wed, 25 Sep 2019 21:24:24 -0400 Subject: [PATCH 9/9] complete set 4 --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index fcf2194..4a30b5f 100644 --- a/README.md +++ b/README.md @@ -122,5 +122,11 @@ git status ``` 2. Commit your change with an appropriate message. Why not? +```git add . +git commit -m "add git documentation" +``` 3. Push your change to GitHub. By refreshing your browser, confirm that the new line has been added to the rendered README. Click on the “official Git documentation” link to verify that it works. + +``` git push +``` \ No newline at end of file