Skip to content

In this tutorial, you will get to know how to upload files or Projects step by step to GitHub using VSCode (the simplest way)

Notifications You must be signed in to change notification settings

sailesh307/GitHubTutorial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

How To upload Files on GitHub (using VSCode)

Table of contents


Prerequisites:

VsCode and Git must be installed on your Computer.

Download Git

Download VSCode


NOTE:

while doing this tutorial, if VSCode ask for sign in, then simply sign in with your GitHub account and give all permissions

rest of the steps will be same

1. Setting USER

1. Search for `git bash` in your PC and open it

search gitbash

2. Now git bash terminal is open.
3. Now type the following command in the terminal.

command to set user name

git config --global user.name "Your User Name"

Eg : git config --global user.name sailesh307

command to set user email

git config --global user.email "Your Email"

Eq : git config --global user.email sailesh953@gmail.com

It will look like this.

git config

Now you can close the terminal.

[Note: This is one time process only. So, we don't need to do this again and again. Just do it once and you are good to go.]


2. Open folder in VSCode

1. Open VsCode
2. Select file > Open Folder

openFolder

3. now select your Folder that you want to upload.

selectFolder


3. Publishing to Github

1. Select Source Control Option

selectSourceControl

2. Now click on Publish to GitHub

publishToGitHub

3. Select option for private or public repository

private => only you can see the repository

public => anyone can see the repository

selectPrivatePublic

4. Now uncheck the checkbox of those file that you don't want to upload

uncheckFiles

I don't want to upload file.txt file so I am unchecking it.

uncheckFiles2

5. then press OK

Now it will start uploading your files to your GitHub repository.

uploadingFiles

after few second Upload will complete.

uploadComplete

Now click on Open on GitHub to view the repository.

Now repo will be opened in your browser.

openGitHub

Now in your Vscode you will see a new file named as .gitignore.
this file will contain all the files that will not upload to github.
you can add any file that you want to ignore.

gitignore


4. Adding new changes or new file

i have added a new file in my repository named newProgram.c

addNewFile

Now click on Source control button.
this will show all the changes that i have made in my repository.

changes

now write commit message(type anything you want) and click on commit changes(the tick option).

commitChanges

Now click on Yes

yes

Now click on three dot and click on push option.

pushChanges

pushChanges

Now open your browser.

openBrowser

Now Referesh the page to view all new file/ changes you have made.

viewChanges

now all new changes are updated in your repository.

if in future you want to add new commit then you can do it by repeating this step again.

[Note : new commit means new changes in your repository]

want to add more changes


5. Want to delete a file

simply delete the file in your VSCode and follow step 4. (as this is a change)

Step 4


6. How to view my Repository

1. open your gitHub account

openGitHub

2. Now click on Repositories

repositories

3. Now click on your repository that you want to view.

THANK YOU for reading this tutorial.

About

In this tutorial, you will get to know how to upload files or Projects step by step to GitHub using VSCode (the simplest way)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published