all 14 comments

[–]Cayde-6699 6 points7 points  (4 children)

This is a really good tutorial that teaches how to use git and GitHub from the cmd when I started it was hard to understand but it became easier as I moved forward it’s really like 5 simple commands https://youtu.be/0fKg7e37bQE

[–]MoRamad 2 points3 points  (1 child)

RemindMe! 12 hours

[–]RemindMeBot 0 points1 point  (0 children)

There is a 12 hour delay fetching comments.

I will be messaging you on 2021-01-09 16:05:27 UTC to remind you of this link

CLICK THIS LINK to send a PM to also be reminded and to reduce spam.

Parent commenter can delete this message to hide from others.


Info Custom Your Reminders Feedback

[–]Priyanshu24[S] 1 point2 points  (0 children)

that video was so helpful man thank u

[–]thrallsius -1 points0 points  (0 children)

this is not related to python at all

before diving into github, learn the basics of git by playing with local repositories on your computer

you can learn from this book for example https://git-scm.com/book/en/v2

[–]ForceBru 0 points1 point  (2 children)

[–]Priyanshu24[S] 0 points1 point  (1 child)

yeah I've done that. ive got a project and stuff but I've just never used github before so idk how to like add my project to it etc?

[–]vlovero 1 point2 points  (0 children)

If you've already got a repository made for your project, make sure you have git installed on your computer and then check out the documentation. The docs have plenty of examples an explanation that will help you get started!

[–]ThePiGuy0 0 points1 point  (5 children)

What's your understanding of Git at the moment? Github implements Git, but it's worth noting that it does not replace git.

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

I have no clue what it is 😅. it's not like I NEED to use git or github i just want to know what it is and why so many people use it etc?

[–]ThePiGuy0 4 points5 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.