diff --git a/unit_01/w01d02/homework/w01d02_homework_git b/unit_01/w01d02/homework/w01d02_homework_git new file mode 100644 index 0000000..f422672 --- /dev/null +++ b/unit_01/w01d02/homework/w01d02_homework_git @@ -0,0 +1,69 @@ +![ga](http://mobbook.generalassemb.ly/ga_cog.png) + +# WDI-PANTHALASSA + +--- +Title: Github Practice
+Type: Homework
+Duration: "0:30 - 1:00"
+Creator: + Kristyn Bryan
+ Course: WDIr Panthalassa
+Competencies: Github, command line git commands
+Prerequisites: Github + +--- + +### Directions +Click on this link and complete all of the steps in the tutorial. Answer the questions below in this markdown file and commit your work at each point when directed. + +1. What command do you use to setup a git repository inside of your folder? +
+**Answer:** +1. What command do you use to ask git to start tacking a file? +
+**Answer:** +1. What command do you use to ask git to move your file from the staging area to the repository?
+**Answer:** +
+** Commit your work.**
+The commit message should read:
+"The 1st set of homework answers are complete". +
+1. What command do you use to pull any changes from the master repository into your local repository?
+**Answer:** +1. What command do you use to unstage a file?
+**Answer:** +1. What command do you use to change your files back to how they were after a commit?
+**Answer:** +1. Why is it important to use `--` when chaging files back to a previous state?
+**Answer:** +1. Why might you want to reset your files back to a previous commit?
+**Answer:** +
+** Commit your work.**
+The commit message should read:
+"The 2nd set of homework answers are complete". +
+1. What command do you use to create a branch?
+**Answer:** +1. What command do you use to use a different branch?
+**Answer:** +1. Why would you want to use a branch other than the default `master`?
+**Answer:** +
+** Commit your work.**
+The commit message should read:
+"The 3rd set of homework answers are complete". +
+1. Give an example for when you would use `git merge` and give an example for when it would be better to submit a pull request to have your branch merged
+**Answer:** +1. What command do you use to send all of the work that you've done locally to your remote repository?
+**Answer:** +
+** Commit your work.**
+The commit message should read:
+"The 4th set of homework answers are complete". +
+### Want more git practice? +Check out this [tutorial](http://gitreal.codeschool.com/?utm_source=github&utm_medium=codeschool_option&utm_campaign=trygit) that includes videos about using git and some challenges for you to tackle. diff --git a/unit_01/w01d02/homework/w01d02_homework_git_SOLUTIONS b/unit_01/w01d02/homework/w01d02_homework_git_SOLUTIONS new file mode 100644 index 0000000..d47b53c --- /dev/null +++ b/unit_01/w01d02/homework/w01d02_homework_git_SOLUTIONS @@ -0,0 +1,71 @@ +![ga](http://mobbook.generalassemb.ly/ga_cog.png) + +# WDI-PANTHALASSA + +--- +Title: Github Practice
+Type: Homework
+Duration: "0:30 - 1:00"
+Creator: + Kristyn Bryan
+ Course: WDIr Panthalassa
+Competencies: Github, command line git commands
+Prerequisites: Github + +--- + +### Directions +Click on this link and complete all of the steps in the tutorial. Answer the questions below in this markdown file and commit your work at each point when directed. + +1. What command do you use to setup a git repository inside of your folder? +
+**Answer:** `git init` +1. What command do you use to ask git to start tacking a file? +
+**Answer:** `git add` and then the file name +1. What command do you use to ask git to move your file from the staging area to the repository?
+**Answer:** `git commit -m"YOUR COMMIT MESSAGE HERE"` +
+** Commit your work.**
+The commit message should read:
+"The 1st set of homework answers are complete". +
+1. What command do you use to pull any changes from the master repository into your local repository?
+**Answer:** `git pull origin master` +1. What command do you use to unstage a file?
+**Answer:** `git reset` and the name of the file +1. What command do you use to change your files back to how they were after a commit?
+**Answer:** `git checkout --` +1. Why is it important to use `--` when chaging files back to a previous state?
+**Answer:** It's promising the command line that there are no more options after the '--'. This way if you happen to have a branch named octocat.txt, it will still revert the file, instead of switching to the branch of the same name. +1. Why might you want to reset your files back to a previous commit?
+**Answer:** Feature broke, sloppy code, etc. +
+** Commit your work.**
+The commit message should read:
+"The 2nd set of homework answers are complete". +
+1. What command do you use to create a branch?
+**Answer:** `git branch` name of the branch that you're creating. +1. What command do you use to use a different branch?
+**Answer:** `git checkout` name of the branch that you want to use. +1. Why would you want to use a branch other than the default `master`?
+**Answer:** To create a feature / so that your new code doesn't interfere with the working code in the master branch, etc. +
+** Commit your work.**
+The commit message should read:
+"The 3rd set of homework answers are complete". +
+1. Give an example for when you would use `git merge` and give an example for when it would be better to submit a pull request to have your branch merged
+**Answer:** Using the `git merge` command if you're working on your own small project. Submit a pull request if you're working on a large project and someone else is in charge of looking at your changes and commits before addit it to the main code (OR open-source project contributions). +1. What command do you use to send all of the work that you've done locally to your remote repository?
+**Answer:** `git push` name of your branch if it's not master. +
+** Commit your work.**
+The commit message should read:
+"The 4th set of homework answers are complete". +
+### Want more git practice? +Check out this [tutorial](http://gitreal.codeschool.com/?utm_source=github&utm_medium=codeschool_option&utm_campaign=trygit) that includes videos about using git and some challenges for you to tackle. + +