The point of this microlab is to get you familiarized with the Git tools.
The slides are located at: https://zipcoder.github.io/reveal-slides/tc-git#/
Fork the repository at
https://github.com/Zipcoder/ZCW-Microlabs-Git
Navagate to whatever directory you plan on using for your root development directory. If you're using a separate directory for microlabs go there. Essentially, just go to where you would normally want to keep all of your work. From there, clone your fork. You should now have ZCW-Microlabs-Git
in your directory.
Create a new branch called dev
in that project and check that out.
Create a new file called newFile.txt
.
Check the status. Notice that there's a new file. Add the text "NEW FILE" to the file, save it, and commit it with the message "Added a new file".
Commit your new branch and changes, and merge into master.
From master, list all of the possible branches. Notice you have HEAD(the pointer to the top of master), remote master, remote dev, local master, and local dev. Now append "On master" to newFile.txt. Commit it with the message "Wrote to newFile from master" and push it.
Checkout dev, and append "On dev" to the file. Commit with the message "Wrote to newFile from dev" and push it.
Checkout master again and merge dev in.
If you did everything right, you should have a merge conflict. Look at newFile and see what git does with the changes.
Fix the file so it reads:
NEW FILE
On dev
On master
Commit and push the change with the message of "Fixed the conflict".
Checkout dev and merge master into it. Notice that everything's cool? That's because the "On dev" message was where it should be for that branch, so git just added the "On master" to the end.
Finally, submit a pull requst from your master in to Zipcode's master!