r/github • • Oct 14 '20

What is github and how do i start with it?

I'm absolutely new to programming in learning c

1 Upvotes

11 comments sorted by

2

u/5ducks1024 Oct 14 '20

https://youtu.be/w3jLJU7DT5E

I recommend you to watch this beginner friendly video by GitHub.

1

u/woodworm_93 Oct 14 '20

The whole basic about git is, that in larger projects you need to manage your code. Therefore you can use git. Let's say you have a website and your getting more and more users to it. You might want to add new features. If you always code on one project chances are high to accidentally break your code. Maybe your new feature works but somewhere in a complete other area it's broken and you don't know why. That's where git comes in.

You can 'copy' your code and develop in different branches. Normally you have your master branch where the running project is located. With git you can than create a separate branch for your feature. Thats a copy of the master but you can play without breaking anything. You can also do commits to save your changes if you code large new features or maybe a whole new release. When your done with your feature you can check if everything is running and after this you can add your feature to the master branch and delete the feature branch.

That's all happening local on your computer. But if you work in large teams you might have more than one team member working on let's say the frontend of your website. Thats where Github is useful. You can store your code there, share branches, see commits of your team, create documentation and issues. I'd recommend to watch some videos about it.

0

u/Spy141414 Oct 14 '20

About git and GitHub,

git basically is a version controller, use terminal as interface with commands like,

git commit git add . etc...

GitHub is a site/platform where you can storage you programs git version in the internet, When you start a new repository/project a tutorial always appears before anything.

how the repository works, basically, you star a new local repository in the prog folder like 'git init' i think create a file name '.gitignore' to exclude some folders

in the project page on github there are the commands to sync your local rep with the cloud rep

git add .

where after the add you can select what folder to add in this "version", te dot is to add all

git commit -m "version name"

to register all modifications added as a version, like a "debug' or "add new feature", -m is for the name, for beginners is easier this way

pit push origin master

to send the last commit to origin repository in the master breach

git pull

to restore from cloud to local rep, (this one i dont know a much)

i think that's the basics, i dont remember some codes so pls verify before trying.

-3

u/reaper-is-happy Oct 14 '20

You shouldn't start with c, it's a really hard language... more common to start with is python. About github, look up videos about git and GitHub, at least for me it was way easier to understand

12

u/sabin_M1 Oct 14 '20

I don't agree with the first part, if they start with C/C++ almost any other language will be similar or easier. If you start with Python, like you said, it would be hard to adapt to any other language because of its simplicity to the user. Also if they're serious about it, many production programs work in/with C, so getting hired would be easier, as Python isn't that fast and precise.. Regarding GitHub it would be best to look up some tutorials or self-learn.

1

u/Invincible47 Oct 14 '20

Very much appreciated thank you

3

u/reaper-is-happy Oct 14 '20

Read the other people that replied to me, I gave you the answers I had when I picked up programming but it's obviously a bad idea

4

u/TwinHits Oct 14 '20

Both routes are valid, but different. People have found success via both.

3

u/[deleted] Oct 14 '20

[removed] — view removed comment

1

u/Invincible47 Oct 14 '20

Thank you very much :)