Skip to content

Instantly share code, notes, and snippets.

@voscarmv
Last active November 24, 2023 14:52
Show Gist options
  • Save voscarmv/5d5acbf24ffbffc5cc4df59a5d1852bd to your computer and use it in GitHub Desktop.
Save voscarmv/5d5acbf24ffbffc5cc4df59a5d1852bd to your computer and use it in GitHub Desktop.
Basic Git/GitHub work cycle for the Microverse HTML/CSS practice project.

How to use Git/Github for web development teamwork: A basic exercise.

Simply follow the instructions in this brief manual.

Keep in mind that Microverse encourages it's students to search for their own solutions online. If you don't know how to do something required by this exercise, try to google it first. If you still encounte trouble, feel free to contact your Practice Sessions Coordinator.

Before we begin, choose one teammate to be Student A, and another to be Student B. If you've already completed steps 1-3 feel free to skip them. Once you're ready, just follow these steps in order:

  1. Both A and B: Create an account on https://github.com/.
  2. Both A and B: Download and install git. Windows users can use https://gitforwindows.org/. Linux users can use sudo apt-get install git instead.
  3. Both A and B: Download and install Visual Studio Code from here: https://code.visualstudio.com/download. This may take some time, so be patient.
  4. Student A: Create a new github repository. If you've never done this before, google How to create a new github repository.
  5. Student A: Add student B as a collaborator to your newly created repository. Again: use google here if you are unfamiliar with this process.
  6. Student B: You should receive an e-mail with an invitation to become a collaborator. Open it, and accept the invitation on GitHub.
  7. Both A and B: Clone the repository using the git clone command in terminal you installed on step 2.
  8. Both A and B: Once you've cloned the repo folder on your terminal, use the cd your-repo-name command to navigate into the repository folder. Just replace your-repo-name with the name you used to create the repository on github.
  9. Both A and B: Use the pwd command to display the path where the project was saved in your computer.
  10. Both A and B: Open the repo folder from that path in Visual Studio Code.
  11. Student A: Add a file to the project named index.html with the content Hello, World! and save it.
  12. Student A: Back at your git terminal, enter the git add . command.
  13. Student A: Enter the git commit -m "First commit" command.
  14. Student A: Enter the git push command. Enter your GitHub credentials if the terminal requires them.
  15. Both A and B: Check the github.com page of the repo and note how the index.html file was added there.
  16. Student B: Using your git terminal, enter the git pull command. This should add the index.html file created by A to your local clone of the project.
  17. Student B: Open the project on Visual Studio Code.
  18. Student B: Add the line How are you? to index.html.
  19. Student B: Just like A did before, use git add ., git commit -m "Updated index", git push, and note how the changes are added to the GitHub page.
  20. Student A: Use git pull to apply the changes on your local clone.

Congratulations! Now you know how to collaborate together on a web development project!

Now use your new programming skills to move forward with the HTML/CSS project.

Cheers and Happy Coding :)!

@GraceAbike
Copy link

I'm really happy doing this

@beyael
Copy link

beyael commented Jan 25, 2022

Cool stuff

@andrew4779
Copy link

cool

@Hossam-Badr33
Copy link

fantastic /

@principles31
Copy link

very simple to follow

@braincee
Copy link

Very insightful and well calculated approach

@AlphaNtihinduka
Copy link

This was so nice to work with Ramrod433.

@Ursaaaaaa
Copy link

this was fun

@Smart1-hub
Copy link

great

@Arturgouveia1970
Copy link

thank you Alpha, finally managed to see this working. when it works it is beautifull...

@marksikaundi
Copy link

good things

@devMunyi
Copy link

devMunyi commented Mar 9, 2022

Well explained and straight to the point. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment