From 861fd73375e577a145588a6eab403a694a3a64c8 Mon Sep 17 00:00:00 2001 From: darsuabasi Date: Thu, 26 Sep 2019 00:36:43 -0400 Subject: [PATCH 1/2] ChangeToReadMeMD --- README.md | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) diff --git a/README.md b/README.md index 6629d35..b56b57a 100644 --- a/README.md +++ b/README.md @@ -2,36 +2,122 @@ ## First Set 1. Create a new directory on your Desktop called git_exercises and cd into that directory. + +cd desktop +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. + +cd git_exercises +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 'Hey 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. + +git add bar + 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 ## Second Set 1. Use touch to create an empty file called baz. + +cd git_exercises +touch baz + 2. Check that it's there by entering `ls`. + +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 baz +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 log +git show + ### 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 +git log -p +q + 2. Create a file `README.md`, add and commit it. + +cd git_exercises +touch README.md +git add README.md +git commit -m 'Hello ReadMe' +git log + 3. Got to github and create a new repository. Connect your local repo to the remote one. + +Dylans-MacBook-Air:git-lab dylanabasiurua$ git remote add origin https://github.com/darsuabasi/GitExercises.git +Dylans-MacBook-Air:git-lab dylanabasiurua$ git push -u origin master + 4. Open your README.md and and add the line `# hello there` at the top of `README.md` and save. + +#hello there + 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 README.md +git status +git commit -m "RM Changes' +git status + 6. Push your changes: `git push origin master`. Refresh your github and click on the commit to verify the changes. +git push origin master + ### Fourth Set 1. Using the markdown below, add a line at the end of the README with a link to the official Git documentation: @@ -42,6 +128,13 @@ [official Git documentation](https://git-scm.com/). ``` +#Hello, world +My name is Uduakabasi + 2. Commit your change with an appropriate message. Why not? +git commit -m "Wah gwan" + 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. + + From 407a3077aa226c66ac6f8ece99a09100c27abbbd Mon Sep 17 00:00:00 2001 From: darsuabasi Date: Thu, 26 Sep 2019 00:43:03 -0400 Subject: [PATCH 2/2] AnotherChange --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b56b57a..a33cc96 100644 --- a/README.md +++ b/README.md @@ -128,13 +128,13 @@ git push origin master [official Git documentation](https://git-scm.com/). ``` -#Hello, world -My name is Uduakabasi - 2. Commit your change with an appropriate message. Why not? git commit -m "Wah gwan" 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. - +'''markdown +~/repos/website/README.md +For more information on Git, see the +[official Git documentation](https://github.com/darsuabasi/git-lab.git) \ No newline at end of file