Where Does Git and Github Fit in Web Development [September]
I encountered Git and GitHub very early in my coding journey (in 2018) during a Tech, Design, and Business Bootcamp.
During the boot camp, we had to create a game using Javascript(p5.js). This was before learning Git.
We were happily creating the game when we encountered a problem that stopped our code from running. We tried everything to resolve the problem but we were not getting anywhere. Yes, we tried everything including the undo button. Nothing worked. We had to start again from scratch.
To avoid the headache, we came up with a neat solution. We decided to always save a copy of our project every time we needed to have a fallback version. That way, we could make changes to our code without fear of messing things up.
Later, we learned Git and a little bit later, GitHub.
Since then, I have been using them regularly. They save me from a lot of potential headache-causing situations. So what are Git and GitHub and why are they important?
Git is a tool that helps a developer keep track of changes in the code they write. With Git, you can easily save and switch between the different versions of your code.
Imagine your code was working. Then you made a couple of changes. Suddenly your code stopped working. You try troubleshooting but you cannot figure out what the problem is. You just want to go back to the starting point where your code was working. Git is the tool that can help you to do that. And much more.
To use Git, you download a Git client and install it on your computer. Then you can use it to keep track of the changes you make in your code.
GitHub is a website and an online version of Git that makes collaboration and version control more easier. Think of it as your Google Drive for your code. You can have your files locally and also online.
GitHub also gives the developers the superpower to work on the same code without conflict with each other.
Having the code saved online is also great because you can access it from any computer instead of having to send files every time you use a different computer or someone else needs to see your changes in the code.
GitHub is not the only cloud-based Git solution. There are others like GitLab and BitBucket.
GitHub also has a static website hosting solution called Github Pages. You can have a look at an example of a website hosted on Github Pages.
Recent Posts on Devpractical
I'm currently learning and writing some posts on Tailwind CSS and PHP. I hope you'll enjoy learning from them.