DEV Community

Cover image for Github 101
rkganeshan
rkganeshan

Posted on

Github 101

Hey, if you are absolute beginner or just started to code recently, and have seen your peers showcasing their projects and works in platforms like GitHub, then you are at the right spot!

I'll let you know some quick easy peasy tools online where in you can code and "PUSH" your code to github by just a click.
Also, I will let you know how to push your entire codebase from your system to GitHub.

(Now here I am assuming that you have created an account on GitHub, if not - do it first, it's simple , create an account directly from your Google Account.)

01 ) If you are quite new to web dev and just trying your hands on experimenting a few stuffs here and there, then try using platforms such as CodeSandbox and Repl.
All you need to is , go to the github icon, connect your sandbox to your github by providing your credentials and after authorization(this is just a one time step) you just need to type out your repository name, a few words about your project and hit the Create button. Similar steps for Repl too. Isn't that easy?
Now you are all set to show case your project.
Bonus here is: You can copy the URL from the output sample browser in your sandbox, go to your Github repo, and in the about section,paste this link under the wesite input field.
So, now your work is all set, pushed into github and your peers can also directly view your project up and running from the URL that you had provided from the Sandbox!

02) If you want to push your project from your System to Github, download GitBash terminal, it helps you to do this in no time.
Now follow the steps:
Step 0: Open the GitBash terminal in the directory wherein your desired project folder(s) exists.
Now type the following commands.
Step 01:git init
Step 02:git add
Step 03:git commit -m "Your message about the commit"
(Now go to GitHub, under repositories create a new Repo by hitting the New button and provide the name of your repository and give some description about it, and you may also set you repo to private or public)
Step 04:git remote add origin https://github.com/yourUsername/yourRepository.git
Step 05:git push -u origin master
Step 06:git push origin master
That's it, now you can check your repo(give a refresh maybe), and in the master branch you would be able to see the changes.
Similar to 01) if you want to host it live, we'll that's for some other day , for sure!

Discussion (1)

Collapse
obaino82 profile image
Obaino82

Thanks alot✌️