2016-11-23 Github

posted Nov 23, 2016, 6:41 AM by Samuel Konstantinovich   [ updated Nov 23, 2016, 11:51 AM ]
Goal: GitHub II, now with more ssh. 

Set up your local git program properly!

-initialize a git repo 
-copy a repo to your local machine (clone) 
-update local repo (pull)
-lock in a version (commit)
-sync changes to github (push)
-load an earlier version of a file if you need.
-do not checkout an entire hash, or you will detach your head.
-NUCLEAR OPTION: When you mess things up and you don't know what to do, rename your local repo, and re-clone it. Manually merge.

URGENT ASSIGNMENT - Github is the tool you will use the rest of this year, and in all future computer science courses at stuy + in the real world. You cannot "do the minimum and get by"
This is an informal assignment, that you are required to do over the upcoming week or so. 
You should have in your notes/index cards/any PHYSICAL medium:
Step by step guides to "idiot proof" your git habits. 
-Cloning a repo OR creating files in a new project
-Working in 2 different computers one after another. (several commits and a push on each)
-reverting back to an old version of a file.
-What to do if it all breaks 
-branching will come later so maybe start looking at it.

Here is a more interactive tutorial that does some things well, and others not so well.

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/laptop (I want it working on the school computers as well, just in case you don't have a laptop)
3. Inside your MKS21X/ directory (on the computer where you cloned it), make a new directory called MKS21X/hw00gitpractice/
4. Make a text file reference.txt inside the hw00gitpractice folder.
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. Do this a few times and use messages that indicate what you did.
11. Look at the changes on your github account on the website.

Enjoy your break. Value time you are able to spend with family... then value the time to you have to catch up on your stuy related activities.