Created
October 24, 2014 01:23
-
-
Save chrisfosterelli/f4dcf34ef94a6c1e412b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WORKSHOP 1 | |
========== | |
Welcome! | |
Step 1: Download Git | |
: http://git-scm.com/downloads | |
Step 2: Setup Git | |
: git config --global user.name "Firstname Lastname" | |
: git config --global user.email "[email protected]" | |
Step 2: Checkout my repository | |
: git checkout https://github.com/chrisfosterelli/gittalkdemo1.git | |
Step 3: Create a new branch | |
: git branch YOUR_BRANCH_NAME | |
Step 4: Go to it | |
: git checkout YOUR_BRANCH_NAME | |
Step 4: Change something | |
Step 5: Stage and commit your changes | |
: git add . | |
: git commit | |
Step 6: Go back to the main branch | |
: git checkout master | |
Step 7: Merge in your new branch | |
: git merge YOUR_BRANCH_NAME | |
Step 8: Tada! Call me over and I'll show you the git log :) | |
Bonus points: | |
You'll have to figure the commands for this one out on your own | |
with Google. Git is a version control system, so you have the ability | |
to look at older versions of files. In the very first commit to | |
the repository you're reading, there was a file called "password.txt". | |
It was deleted later on, so it's no longer in the "current" version. | |
What is the password in that file? Let me know if you get it! | |
Double bonus points: | |
With Git, you can rewrite the history. This is almost always a VERY bad | |
idea to do, because it causes all sorts of problems everywhere. | |
Let's do it though! Rewrite the Git history of this repository and | |
show me that you changed the commit messages. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Step 2
Should be
git clone https://gith...
Also I would recommend instructing to
cd gittalkdemo1
before creating the new branch.Extra Thoughts
I would also recommend teaching
git status
andgit add <filename>
orgit add -p
rather than adding all changes at once.