Update README.md
Updated Clone your fork - instructions added for navigating using cd and how to add file path. Updates Commit and Push your changes - added using cd prompt to navigate and a statement in brackets about how you only need to add files, not the folder.
This commit is contained in:
parent
22cd76cc3e
commit
97a66ec8f5
1 changed files with 6 additions and 5 deletions
11
README.md
11
README.md
|
|
@ -218,10 +218,11 @@ Here’s a diagram (if this is helpful, great! If its just more confusion, don
|
||||||
|
|
||||||
1. After you’ve forked the “upstream” repository and have navigated to **your** forked repo on GitHub, copy the git url from the repository page. Screenshot: 
|
1. After you’ve forked the “upstream” repository and have navigated to **your** forked repo on GitHub, copy the git url from the repository page. Screenshot: 
|
||||||
2. In your command prompt, navigate to the location you want to clone your repository to in your file system, then run the command `git clone` followed by the url you copied. In my case that looks like this: 
|
2. In your command prompt, navigate to the location you want to clone your repository to in your file system, then run the command `git clone` followed by the url you copied. In my case that looks like this: 
|
||||||
|
(To navigate to the location you want to clone your repository - use the 'cd' command followed by the path to the folder you choose - this can be copied from your file explorer). 
|
||||||
|
|
||||||
This will pull down the repo to you computer, creating a directory wherever you run the command, named whatever the repository you are cloning is named. In this case, the directory it created was called `the-heartbroken-dev-tier-1`.
|
This will pull down the repo to your computer, creating a directory wherever you run the command, named whatever the repository you are cloning is named. In this case, the directory it created was called `the-heartbroken-dev-tier-1`.
|
||||||
|
|
||||||
3. List the contents of the directory you’re in to confirm the clone operation was successful: 
|
3. List the contents of the directory you’re in 'dir' to confirm the clone operation was successful: 
|
||||||
(I also used the `|` pipe and `grep` commands in my example to filter the results of running the list contents command `ls` to just results the contained `the-heart`. If you’re interested, you can read about pipe and grep in linux here: https://faculty.winthrop.edu/dannellys/csci208lab/lab09.htm)
|
(I also used the `|` pipe and `grep` commands in my example to filter the results of running the list contents command `ls` to just results the contained `the-heart`. If you’re interested, you can read about pipe and grep in linux here: https://faculty.winthrop.edu/dannellys/csci208lab/lab09.htm)
|
||||||
|
|
||||||
#### Open the Repository You Cloned
|
#### Open the Repository You Cloned
|
||||||
|
|
@ -246,9 +247,9 @@ Now we want to add some of your code to this repository. We’ll use the html an
|
||||||
|
|
||||||
Ok, now we’ve made changes to our local repository, and we should “push” these changes to our remote repository so they aren’t just on our computer.
|
Ok, now we’ve made changes to our local repository, and we should “push” these changes to our remote repository so they aren’t just on our computer.
|
||||||
|
|
||||||
1. From your command prompt, navigate to this repository’s directory, and add the new files and changes to the git “staging area.” Do this with the `git add` command. Some notes:
|
1. From your command prompt, navigate to this repository’s directory using 'cd', and add the new files and changes to the git “staging area.” Do this with the `git add` command. Some notes:
|
||||||
1. You can see what the state of your repository is, including changed files and what has been added to the staging area by running `git status`: 
|
1. You can see what the state of your repository is, including changed files and what has been added to the staging area by running `git status`: 
|
||||||
2. `git add` needs an additional argument passed to it: the specific files you want to add. You can specify the files specifically, one at a time, or multiple other ways.
|
2. `git add` needs an additional argument passed to it: the specific files you want to add. You can specify the files specifically, one at a time, or multiple other ways. (git add doesn't need you to add the folder only the specific files)
|
||||||
3. A nice shortcut if you want to add everything that’s been updated to the staging area is the `.` specifier, which says “the things in my current *working directory*” (working directory just means the directory you’ve currently navigated to in your command prompt).
|
3. A nice shortcut if you want to add everything that’s been updated to the staging area is the `.` specifier, which says “the things in my current *working directory*” (working directory just means the directory you’ve currently navigated to in your command prompt).
|
||||||
4. So, the end result is (assuming you’ve navigated to your repository folder): `git add .` 
|
4. So, the end result is (assuming you’ve navigated to your repository folder): `git add .` 
|
||||||
5. Run `git status` again and see that the files have been staged and are ready to be “committed”: 
|
5. Run `git status` again and see that the files have been staged and are ready to be “committed”: 
|
||||||
|
|
@ -276,4 +277,4 @@ Okay, lastly we are going to request to pull your changes you made on your copy
|
||||||
|
|
||||||
#### PHEW!
|
#### PHEW!
|
||||||
|
|
||||||
Alright, you’ve done it! That was probably a lot of stuff for a lot of you, but you’ve successfully navigated the command line, wrapped your head around git and github and even used it to make what’s possibly your first ever PRs in your career…. HELL YEAH!
|
Alright, you’ve done it! That was probably a lot of stuff for a lot of you, but you’ve successfully navigated the command line, wrapped your head around git and github and even used it to make what’s possibly your first ever PRs in your career…. HELL YEAH!
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue