2015-12-03 Git Practice

posted Dec 2, 2015, 8:04 PM by Samuel Konstantinovich   [ updated Dec 3, 2015, 10:11 AM ]
You may get some git errors when doing this regarding your email address or name.

Your Identity

The first thing you should do when you use Git for the first time is to set your user name and email address. This is important because every Git commit uses this information, and it’s immutably baked into the commits you start creating: (this means it tags the info so I can see it)

Also note: Your git global user.name is NOT your login for github, it is your name that is displayed. 

$ git config --global user.name "Real Name"
$ git config --global user.email realName23@example.com

When you use:
       YOU MUST USE THE SAME EMAIL that you have associated with your github account. 
  1. Confirm that you have set your email address correctly with the following command:   (it will echo your email address)

  2. $ git config --global user.email
Once you set your user.name, and user.email try to do some basic git shell commands on the school computers:  (if these directions don't make sense post questions... I have a bad headache and am going to sleep now)

1. Make a new git repo called : MKS21X , and be sure to initialize it with a readme file.
2. Clone the  repo on your school computer (I don't care if your laptop has it, I want it working on the school computers as well)
3. Inside your MKS21X/ directory, make a new directory called MKS21X/hwGitPractice/
4. Make a text file reference.txt
5. Write in that text file a list of all of the git commands you learned so far! 
6. Use your git powers to add the file so that it is tracked by git, and then commit your changes.
7. Edit reference.txt by adding your description of what each command does. (Define each term, use google if you need to)
8. Commit your changes, and push so you don't forget late
9. Check the git website, go to your repo. Look at "Graphs" : Contributors / Commits. These two sections show everyone who is working on what. 
10. Make some bogus changes, commit them and push. 
11. Roll back the changes using the last good SHA value on the status. 
12. Push your changes. 

(if these directions don't make sense post questions... I have a bad headache and am going to sleep now)

PART 2: SSH KEYS!!!! Try to get your ssh keys working in the lab.
    SUPER CRITICAL: At Step 4 You cannot use "clip" instead use emacs to open the file, then copy like you normally copy.