The goal for this exercise is to
make sure that you can use Visual Studio to add a new file to your local git repo
("local" means "the one on your computer, instead of the one on GitHub")
For this
exercise you'll put a new file into the project and commit that change.
This will allow you to add files to your program if you'd like.
For this exercise th ename file that you upload will have your name in it
so that I can figure out which GitHub repo goes with this person :)
PLEASE PLEASE PLEASE USE YOUR NAME
AS THE FILE'S NAME!
If your account name is pretty close to your real name then I can use
that to figure out which repo is yours. But if you've got a GitHub
username that's different than your real name then it's really tricky for me
to find which repo belongs to you.
PLEASE INCLUDE A
FILE WITH YOUR NAME (AS THE FILENAME) FOR ALL LESSONS!!!
For example, since my name is Michael Panitz I might
name the file Panitz, Michael.txt. My last name
(Panitz) that I used to register for the class is clearly visible in the
filename which will help the instructor to clearly identify who's work this
is.
This will help me grade your work quickly, accurately, and get you the
points that you've earned! :)
What you need to do for this exercise:
- Make sure that you've still got the GitHub_Practice solution open in
Visual Studio
- Within your project create a new
text file that clearly shows me your name (in the name of the file)
- Click on File -> New -> File:
- In the left-hand column make sure that you click on the
'General' tab.
In the main window click on 'Text File'
Then
click 'Open'
- At this point you'll be looking at an empty text file:
(The '1' that you
see is the line number for that first line tha tyou can start typing
on)
- Please type your name into this file.
I
shouldn't need it, but it doesn't hurt and it's weird to have save
an empty file :)
- Next, save the file by clicking File -> Save Textfile1.txt
- Here's the important
thing: SAVE THE FILE SO THAT THE FILE'S NAME SHOWS ME YOUR NAME!!!!!
If you could list your last name, then your first name that would be
strongly prefered.
(By "last name" I mean "when you registered
for classes with Cascadia College whatever you told Cascadia is your
last name")
Then click 'Save':
- Add that new
file to git (so that you can push this to GitHub along with the rest of
your changes)
In VIsual Studio open up the Git Changes panel by using the View
--> Git Changes option.:
- You should see the file that you just added listed under 'Changes'.
Click the + icon to tell git that you'd like to stage the file
(To
stage the file tells git to save a copy of the file so that you can
commit it later. Because staging and commiting are two separate
steps this lets you pick out only some of the files to commit)
- At this point there's three things to notice or do:
- Notice that the file is now listed under 'Staged Changes'
- Make sure that you include a commit messsage describing your
changes
- Finally, click on the 'Commit Staged' button to commit the new
file to your local copy of the git repo