git Assignment (60-120m)
- Due Feb 10, 2020 by 11:59pm
- Points 100
- Submitting a file upload
The goal for this assignment is to be able to make changes to your web application from your local hard drive and publish them to github. Publishing to github will trigger heroku to reload your app. You will be able to edit locally and periodically publish your content to a live website.
Just to make sure you understand the software:
- git is a program that is open-source and that manages collections of files
- github is a website that uses git, stores your files in the cloud and provides additional features for using git through a web browser.
- SourceTree is a program that runs on your local computer, works with files stored on your local hard drive and provides additional features for git through it's GUI.
Assignment:
Step 1: Complete the tutorials here: https://confluence.atlassian.com/get-started-with-sourcetree Links to an external site.
- Install and Set Up SourceTree Links to an external site.
- Understand the Interface Links to an external site.
- Version Control and SourceTree Links to an external site.
- Work Using git Links to an external site.
Step 2: Download and Install SourceTree to your computer from https://www.sourcetreeapp.com/ Links to an external site.
Step 3: Clone your github repository using SourceTree. To do this you will need your repository location (a URL from github), then you will enter that into SourceTree. SourceTree will then synchronize your computer's files with those on GitHub.
Step 4: Make a change to the files that are now on your hard drive using an editor program (Not SourceTree) You will see me using "gvim", "vim" or "vi" in the videos, but unless you know those programs I highly recommend Atom Links to an external site., or Sublime Links to an external site.). For example, I'm going to clean up my index.html file. Once you have saved your file(s) return to SourceTree. You will see a new node in the history of your project called "Uncommitted changes". Select that line.
Step 5: The files that you have changed will be in the section marked "Unstaged files". If you select one then the changes will be show on the right with deleted lines in red and added lines in green. Stage all the changed files by selecting the checkboxes next to their names.
Step 6: Now "Commit" those changes to your local repository. (Commit is the button on the upper left). You will be prompted to enter a message that describes what you changed. Enter such a message then select commit on the lower right.
Step 7: "Push" your changes to GitHub with the button on the upper left so that your local changes are synchronized to the cloud.
Step 8: Verify that your changes ended up on GitHub and then that the changes were propagated to Heroku by opening your application from Heroku.
You have demonstrated the ability to make a change on your local computer to your web application, commit your files using SourceTree, push your changes to GitHub, this triggers Heroku to reload your web application, which you can then view through your browser. Viola! You are now doing "continuous integration" like a pro.
Submit a screenshot of SourceTree that shows edits that you made on your local computer with red and green lines in the display.