A consultant will lead you through retrieving and responding to the diagnostic.
For the diagnostic itself, you have 30 minutes.
Navigate to this repository in Chrome. The URL should be in slack forum.
If necessary, login to GitHub. If you are not logged in, the Sign in
button
will be at the top right of the page when you navigate to
Github
Click the Fork button in the upper right hand corner of the page.
GitHub creates a copy of the repository and redirects the browser.
Open a terminal window then at the shell prompt:
cd ~
mkdir wdi
cd wdi
mkdir diagnostics
cd diagnostics
The first cd ~
- change directory - ensures that you start in your home
directory/folder.
mkdir
creates a new directory/folder with the supplied name. If you get an
error message that includes File exists
when you run mkdir
it probably means
you've already created the directory and can move on to the following cd
.
On GitHub, in your copy of the repository, find the clone URL widget - SSH/HTTPS
drop-down, corresponding URL text-box, and Copy to clipboard
button (centered
in the following image).
Before copying the clone URL to the clipboard, use the drop-down to select
SSH
. In Which remote URL should I
use? GitHub
recommends using https
remotes. We will always use ssh
remotes during your
training.
Click the 'Copy to clipboard' button.
Remember it should say SSH
in the drop-down when you do.
Back in the terminal (you should still be in the diagnostics
directory created
above):
git clone
Then paste the copied clone URL, run the command, and change into the newly created directory:
git clone git@github.com:<GitHub username>/fundamentals-diagnostic.git
Cloning into 'fundamentals-diagnostic'...
remote: Counting objects: 5, done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 5 (delta 0), reused 4 (delta 0), pack-reused 0
Receiving objects: 100% (5/5), done.
Checking connectivity... done.
cd fundamentals-diagnostic
Create a response
branch then open diagnostic.md
with atom.
git branch response
git checkout response
Switched to branch 'response'
atom diagnostic.md
You may use ANY resource, other than someone else in the workspace, to help you complete the diagnostic.
Rendered markdown may be viewed by following this link.
You should delete _Replace this text with your answer._
following each
questions and replace it with your answer. Code answers need not be in
markdown.
Please start to review any linter errors you may see. The error will inform you what the error is and which line and column number the error is located. Linters help us to write clean, symantically correct code so we should start to pay attention to what the errors are telling us.
git status
On branch response
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: diagnostic.md
no changes added to commit (use "git add" and/or "git commit -a")
In order to stage these changes, we need to add the file that has changed:
git add diagnostic.md
Now that the changes have been staged, we have to make a commit:
git status
On branch response
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
modified: diagnostic.md
git commit
When a 'git commit' is executed, Atom will open a text file containing comment
lines (starting with a #
) describing the changes being committed. These lines
are not included in your commit message.
Format for submitting 'git commit' messages.
<headline of the commit>
<description of the commit>
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# On branch bb-prep
# Changes to be committed:
# modified: diagnostic.md
#
Enter Fundamentals diagnostic response
as the headline. Hit enter twice to
leave a blank line. Add a description to the commit message. Once your
description is complete, save the file and close the Atom window. This will
commit the message. When you go back to terminal, you should see something like:
git commit
[response 29a63bc]
1 file changed, 25 insertion(+), 6 deletion(-)
$
Now, push the changes to your forked repository on Github.
git push origin response
Counting objects: 3, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 304 bytes | 0 bytes/s, done.
Total 3 (delta 2), reused 0 (delta 0)
To git@github.com:<GitHub username>/fundamentals-diagnostic.git
* [new branch] response -> response
$
We'll follow the GitHub help article, Creating a pull request skipping step 4.
Congratulations, you have successfully submitted your first diagnostic by opening a pull request! This is the process we will follow for *every diagnostic. The consultant team will respond to your pull request with feedback on the answers to the diagnostic.
Additional GitHub help articles.
Source code distributed under the MIT license. Text and other assets copyright General Assembly, Inc., all rights reserved.