#==== Git Workshop ====
This repository contains files and commits used as a base for this workshop. The repository contains some python files but we will not run the code in this workshop and you do not need to have python installed for this workshop.
##0 - Preparations - Git Setup 0.1 Install Git. Follow instruction on https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
0.2 Do initial configuration, as described on https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup
##1 - Creating commits ###1.1 Staging changes Fix the typos in the messages in hello_messages.py and good_byes.py and add both files to the staging area.
###1.2 View differences Now take care of the todo found in good_byes.py. Then make git show you the detailed differences between the working directory, stage area, and local git repository.
###1.3 Remove a file from stage Now we changed our mind and only want the changes in hello_messages.py to be part of our next commit. Unstage the other changes. Then commit the change in the stage area and write a message describing your change.
###1.4 Add part of a file to stage Translate the message in hello_messages.py to another language. In our next commit we only want to include the spell checking fix in good_byes.py. But since we have made two changes in that file we only want to stage the first part of that file. Commit the typo fix, and create another commit with the other change made in good_byes.py
###1.5 Discard changes of a file Turns out the message in hello_messages.py should be in english. Discard the changes to the file.
##2 - Reverting changes
###2.1 Revert a commit Without changing the history we want to revert the changes that we made in our last commit, containing the implementation of the todo. Use git to create a new commit that reverts that change.
###2.2 Revert one file to an earlier state List the commits that modifies the file bar.txt and create a new commit that reverts the file back to the state after the "Yummy" commit.
##3 - Rewriting the history
###3.1 Changing the commit message Change the print message "Today is a day" in main.py to say "Today is a Monday" instead. Commit with the commit message "stuff". Then use amend to change the commit message in your commit to better explain the change made.
###3.2 Adding more changes to the last commit Oh, we forgot to add an exclamation mark after the word Monday. Fix this and add let this and the last change be in the same commit.
###3.3 Change the commit message of an earlier commit Take a look at the log over the commits that you have done. Then update the commit message of your earliest commit.
###3.4 Squash together commits Translate the top messages in hello_message.py and good_byes.py to a language of your own choice. Create one commit for each file. Then translate the today message in main.py as well and commit the change. Now meld together the two commits in which you translated the hello and good bye messages.
###3.5 Undo rewriting the history On second though, lets keep the changes of the hello and good bye messages as two separate commits. Go back to the previous state, before the commits were melded.
###3.6 Modify the changes of an earlier commit Erase foo.txt from the commit history.