From 52c79925c5154a78d7b301a16e3539dbbbe70779 Mon Sep 17 00:00:00 2001 From: Jocelyn Zhao <72326049+joce04@users.noreply.github.com> Date: Sat, 17 Aug 2024 22:21:49 -0700 Subject: [PATCH 1/6] Update README.md --- README.md | 33 ++++++++++++++------------------- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index eb81b2a..7216c82 100644 --- a/README.md +++ b/README.md @@ -57,10 +57,10 @@ First, fork this repository to create your own copy. Next, clone **your fork** using the `git clone` command. This will create a copy of your repository on your computer (called a *local copy*). -**Note**: Replace `YourGitHubUsername` with your *actual* GitHub username. +**Note**: Replace `link` with the link under the green (code) button at the top of the repository ```console -git clone https://github.com/YourGitHubUsername/exercises-git-pull-request.git +git clone link ``` This will create a directory named `exercises-git-pull-request` inside the current working directory. Enter the directory with the following command: @@ -88,14 +88,14 @@ $ Let's create a new branch and switch to it. Run the following: ```console -git checkout -b first-feature +git checkout -b your-name ``` Run `git branch` again and you should see: ```console $ git branch -* first-feature +* your-name master $ ``` @@ -104,10 +104,10 @@ $ **Note**: Remember to use commands like `ls` and `pwd` to verify you're in the correct directory and looking at the right files. -While on the `first-feature` branch, create a file named `hello.txt` that contains the following text: +While on the `your-name` branch, create a file named `hello.txt` that contains the following text: ```text -Hello! This is my first pull request. +Hello! This is my first pull request. My name is _____ ``` Make sure to save the file. In the console, run the following command: @@ -168,8 +168,10 @@ Run `git status` and note how the output changed. Right now, your branch exists on your machine but doesn't yet exist on GitHub. To simultaneously push your changes up to GitHub and create the branch on GitHub, run the following command: +Replace `branch_name` with the name of the branch (should be your name, or whatever you named it earlier) + ```console -git push --set-upstream origin first-feature +git push --set-upstream origin branch_name ``` Here `origin` refers to GitHub. @@ -182,22 +184,15 @@ On GitHub, you should see the following: -You have two ways to request a code review: - -1. Add one or more instructors as collaborators on your project and then select them from the "Request Review" dropdown -1. Leave a comment `@`-mentioning anyone you want a code review from. If you want a review from GitHub user `SnorkleFish` then leave a comment that looks like: - - ```text - @SnorkleFish I'd like a review! - ``` +Ta-da, first pull request! ## Merging Pull Request -Once you're ready to go, merge your pull request into the `master` branch. Don't wait for a review to merge unless you think it's critical. +Please don't do this, but it is good to know how to merge. +Once you're ready to go, merge your pull request into the `master` branch. There should be a button that pops up on your pull request. [github-fundamentals-i]: https://github.com/jfarmer/exercises-javascript-fundamentals [atlassian-feature-branch-flow]: https://www.atlassian.com/git/tutorials/comparing-workflows/feature-branch-workflow From 4dab9e62f9c112026549fc7b19d29aec76b97151 Mon Sep 17 00:00:00 2001 From: Jocelyn Zhao <72326049+joce04@users.noreply.github.com> Date: Sat, 17 Aug 2024 22:35:43 -0700 Subject: [PATCH 2/6] Update README.md --- README.md | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 7216c82..27389db 100644 --- a/README.md +++ b/README.md @@ -51,11 +51,21 @@ This process is called the *[feature branch workflow][atlassian-feature-branch-f We're going to create a pull request that contains two individual commits involving different files. -### Fork And Clone This Repository +### Clone This Repository -First, fork this repository to create your own copy. +Open VSCode (or your terminal) -- VSCode is recommended. Go to View -> Terminal to see your terminal (you can also "drag up" from the bar at the bottom of the screen). You will be typing the commands below into the terminal. When I open it, I see this: +```console +jocelynzhao@Jocelyns-MacBook-Pro ~ % +``` +This indicates that I am in my home repository. Running `ls` lists the files and folders in my home repository. In my base repository, I have a folder called Desktop. To go into my Desktop folder, I run `cd Desktop` which shows + +```console +jocelynzhao@Jocelyns-MacBook-Pro Desktop % +``` +I can continue navigating through my file storage system like this, until I find where I want to store my folder (I usually create a folder somewhere called SUBC and put all my SUBC related folders in there). Don't worry about doing this if it's too complicated though. -Next, clone **your fork** using the `git clone` command. This will create a copy of your repository on your computer (called a *local copy*). + +Next, clone **your fork** using the `git clone` command. This will create a copy of your repository on your computer (called a *local copy*) that exists in your current folder. **Note**: Replace `link` with the link under the green (code) button at the top of the repository @@ -69,6 +79,11 @@ This will create a directory named `exercises-git-pull-request` inside the curre cd exercises-git-pull-request ``` +You can now open this folder using VSCode. Press the file icon (Explorer), then press Open Folder. Navigate through your filesystem until you get to where you stored the folder `exercises-git-pull-request`. Select the `exercises-git-pull-request` folder and click open. This should load the folder into your VSCode. You will be able to add files and folders very easily by right-clicking on the left navigation bar. You can edit files by directly clicking on them, this should load the files into your main window. + +**Note**: at this point, you may need to reopen your terminal. You can do this the same way as described earlier. + + ### Create A Feature Branch When we're inside a git repository, there is always an "active" branch. To see a list of all the branches run: @@ -85,7 +100,7 @@ $ git branch $ ``` -Let's create a new branch and switch to it. Run the following: +Let's create a new branch and switch to it. Run the following, replacing your-name with your actual name: ```console git checkout -b your-name From 5ead3743c76d6f6b858eba24a18c314fe1fff282 Mon Sep 17 00:00:00 2001 From: Jocelyn Zhao <72326049+joce04@users.noreply.github.com> Date: Sat, 17 Aug 2024 22:43:11 -0700 Subject: [PATCH 3/6] Update README.md --- README.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 27389db..e40fe52 100644 --- a/README.md +++ b/README.md @@ -199,15 +199,23 @@ On GitHub, you should see the following: +This is what the correct version looks like: +Screenshot 2024-08-17 at 10 41 52 PM + + Ta-da, first pull request! ## Merging Pull Request -Please don't do this, but it is good to know how to merge. -Once you're ready to go, merge your pull request into the `master` branch. There should be a button that pops up on your pull request. +You don't have to do this for this exercise, but it is good to know how to merge. +Once you're ready to go, merge your pull request into the `master` branch. There should be a green button that pops up on your pull request. You may need to have your code reviewed by another person first, depending on the rules for the repository. [github-fundamentals-i]: https://github.com/jfarmer/exercises-javascript-fundamentals [atlassian-feature-branch-flow]: https://www.atlassian.com/git/tutorials/comparing-workflows/feature-branch-workflow From 61ce9955da08ae39dbb6348afb1809d942d67a1a Mon Sep 17 00:00:00 2001 From: Sssyq13 Date: Sat, 28 Sep 2024 13:42:02 -0700 Subject: [PATCH 4/6] hello.txt is a lovely file --- hello.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 hello.txt diff --git a/hello.txt b/hello.txt new file mode 100644 index 0000000..fcf4475 --- /dev/null +++ b/hello.txt @@ -0,0 +1 @@ +Hello! This is me first file! \ No newline at end of file From cba8151bd067fe392f926482ab4ab8138d063809 Mon Sep 17 00:00:00 2001 From: Sssyq13 Date: Sat, 28 Sep 2024 13:56:58 -0700 Subject: [PATCH 5/6] hello.txt is still a lovely file --- hello.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hello.txt b/hello.txt index fcf4475..7a59e63 100644 --- a/hello.txt +++ b/hello.txt @@ -1 +1,2 @@ -Hello! This is me first file! \ No newline at end of file +Hello! This is me first file! +This is another try! \ No newline at end of file From 8a1e342b03d7bba2cc1487670d596dd9edba06d5 Mon Sep 17 00:00:00 2001 From: Sssyq13 Date: Sat, 28 Sep 2024 14:04:54 -0700 Subject: [PATCH 6/6] Time to say goodbye --- goodbye.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 goodbye.txt diff --git a/goodbye.txt b/goodbye.txt new file mode 100644 index 0000000..def298d --- /dev/null +++ b/goodbye.txt @@ -0,0 +1 @@ +Goodbye! About to submit my first pull request.