This repository has been archived on 2023-11-08. You can view files and clone it, but cannot push or open issues or pull requests.
How-To-Git-Started/assignments/README.md

1.7 KiB

Assignments

Assignment 1: Create a repository

  1. Create your own new repository
  2. Add a .gitignore file
  3. Why you would like a gitignore file
    • Not pushing sensitive files
    • Not pushing environment files
  4. Add a README.md

Assignment 2: Your first commit

  1. Clone repository
  2. Edit README file
  3. Create a new file(s) and add information
  4. Stage README and your file(s)
  5. Commit README and your file(s)

Assignment 3: Merge conflicts

  1. Go to the How to Git started repository
  2. Add icecream.py to your repository
  3. Choose a partner
  4. Add him/her as a collaborator
  5. Make the partner clone your repository
  6. Let both of you edit the same line in the code file
  7. Let one of you stage and push the changes
  8. Solve the merge conflict

Assignment 5: Branching

  1. Go to the How to Git started repository
  2. Add index.html to your shared repository.
  3. Let person A create a new branch called header
  4. Let person B create a new branch called footer
  5. Let person A edit the header of index.html
  6. Let person B edit the footer of index.html
  7. Stage and push the changes
  8. Pull the latest changes
  9. Track the branch of your partner

Assignment 6: Merge branches (Or Rebase)

  1. Go to your master branch
  2. Merge it with the header branch
  3. Commit the merge
  4. Merge it with the footer branch
  5. Commit the merge
  6. Push the changes
  7. Delete your old branches

Assignment 7: Pull requests

  1. Let one of you create a new repository (do not add collaborators)
  2. Stage and commit a file
  3. Let the other person fork the repository and clone it
  4. Let him/her change the file and push it
  5. Let him/her create a new pull request via the GUI
  6. Let the other approve and merge the request
  7. Let the other pull the latest changes