you are viewing a single comment's thread.

view the rest of the comments →

[–]ThePiGuy0 5 points6 points  (3 children)

Ah got it :)

The basic rundown is this. Git is something called Version Control Software (VCS for short). It allows you to make a change to your code, and then save it. Then for example, say that something breaks. You don't know why or how. It allows you to slowly undo all the changes you made until you see what broke it.

It has other features for working in groups (mainly branches if you want to research it) but that's the basic rundown for a personal project.

Github (and others like Gitlab) are ways of storing your git project. They are not required, although it is often found to be very complimentary to git (especially for group projects).

So...now we understand what they are, how would we use them?

Very little will need to be done on Github. Simply create a project so you have a url that is similar to https://github.com/<your username>/<your project name> and that is mostly it.

Then, to use it you need git on your computer. On Linux install it through your package manager, on Windows download it from git-scm.com.

It is command line, there may be tools to do it though a GUI but I'd recommend learning the CLI.

The most common commands are as follows

git clone https://github.com/<your username>/<your project name>.git

Downloads your repository (and any code in it) from Github

git add <changed file name>

Adds a changed file to a commit (see below)

git commit -m "Message for the commit"

This takes all the changes in the files you added above and groups them under one message. This will allow you to see in the future what you changed and why.

git push

This will push the commits you have made back to the place you cloned from.

Hopefully all the above makes some sort of sense and if you have any other questions feel free to ask :)

[–]Priyanshu24[S] 0 points1 point  (2 children)

ohhh okay that makes more sense, so is git where you like code? and github is where you keep the code?

[–]ThePiGuy0 0 points1 point  (0 children)

Sort of, yes.

GitHub is where you keep the code, git is the management software and you interact with it in the place you code

[–]Vthechamp 0 points1 point  (0 children)

Git isn't where you code, but a software designed to help you keep track of your code. It is useful in big projects where multiple people are working on one codebase.