How to upload code on Github | upload existing project | simple git commands

preview_player
Показать описание
This is a super simple way on how to upload your existing code to a Github repository. A repository is basically just a folder stored on Github, which is always available to you. Like putting your code in Dropbox.

And here is another awesome thing about Github - it comes with version control!
This means you can see previous commits and compare them to what you got right now.
What's the point of that you say?

Let's say you wanted to explore a new feature for your project and it was a HUGE MISTAKE. What do you do - go.
With Git this becomes like an everyday task. Something didn't work out - better revert my changes I guess. And boom! We're back to where we started before we went into the rabbit hole.

We will make our brand new repository on Github and make sure we set the correct origin in our terminal so it knows where to send our code when we push it out. Make sure that all the Git commands are made in your project directory. It's tracking your files, so we want it to track the correct files.

The fundamental Git commands we will use in this video are:
- git add .
- git commit -m "Your commit message here"
- git push

These commands, with a couple more, are 20% of Git that does 80% of the work. And knowing how to use them will get you a long way.

To use Git in your terminal you need to download it.
The wizard asks you about a bunch of technical stuff, that I usually just click next on, but do it on your own risk.

It comes with its very own terminal called Git bash.
To connect your project to your Github, you need to do a command in your terminal while pointing to your project directory. This command is git init and it will make Git start tracking the files in your project.
Рекомендации по теме
Комментарии
Автор

I am unable to upload my files, it is taking lot of time

rakesharigela