Is Everything I Upload on Github Public
How to upload lawmaking to Github?
Well, in that location are two ways to do that :
- Through UI of github.com website
- By typing in commands from the command line
Though it is admittedly fine for beginners to utilise the outset method and and then shift to the command line and hence nosotros are going to wait both ways to do that and very basics of them.
Then, I assume y'all have a project which you want to upload or basically a binder in which some files are nowadays and if not, then create one following this:
Make a folder name 'project-01', within that create a file index.html and write anything there doesn't thing, we just need to upload that cool thing.
Now, get to github.com and make your account, brand sure you put a cool username as you are going to be the next geek master of your college.
Pace-1:
Motility your eye to the upper right corner of the website and click on this plus sign and so click on the New repository.
STEP-two:
A screen will open up as beneath, give your repository a name, keep it public and click on the checkbox displaying "Initialize this repository with a README" .
STEP-3:
This screen should come up upwardly, if it is non coming make certain in the last step, you clicked the checkbox saying initialize information technology with readme. Now, in correct side see a button maxim upload files. Click on that
STEP-4:
Below screen volition come up, now click on the 'choose your files' link and motility within the folder projection-01 and select all the files at one time. And subsequently that at bottom, a form will come, in that location blazon your message. For e.g., "completed the website" and leave the description part and click on commit changes button.
Later this step your lawmaking will be uploaded to github and now you lot tin share your link to anyone saying, look at my awesome piece of work here.
METHOD-two:
If y'all are satisfied by uploading files through UI, its absurd leave this department but if you want to know how you can do same using the control line or a software called git, come on with me.
Go here and download the software i.due east git for your operating system(No demand to download if you are using Linux). At present, become inside the binder projection-01. If yous are using windows, upon right click inside that folder, an selection volition be there, 'open git bash here' click on that and a blackness screen will appear. If you're on Linux, move inside project-01 directory through terminal.
Now ringlet up and proceed with footstep-1, simply in step-two, this fourth dimension, don't click on the checkbox showing "Initialize this repository with a README" and click on create repository. Now a screen like this will announced
Now, go back to your blackness screen( or last or command line), and start copying and pasting these lawmaking snipetts,
echo "#test2">>README.dr.
git init
git add .
git commit -m "offset commit"
git remote add origin https://github.com/your_username/repo_name.git
git push -u origin chief
This volition push button your code to the Github in the same mode as we have done in the METHOD-1, make sure yous replaced the your_username and repo_name with your username and repository name.
And so, this is all. I showed how to upload code to github which was the title of this commodity simply I have non explained anything why we are doing this step, because I don't want to make this more than tough for you, one step at in one case, now with time you will learn why you wrote git init, what is git remote and push, that all are with git.
If yous want me to write further on this, let me know through comments. Thank you !!
Source: https://medium.com/@sauravbhagat_10426/how-to-upload-code-to-github-6db1c8ff56aa
0 Response to "Is Everything I Upload on Github Public"
Post a Comment