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

geekcourses/GitHubTutorial-Using-VSCode

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 

Repository files navigation

How To upload Files on GitHub (using VSCode)

Table of contents


Prerequisites:

  1. You must have a Github account. If not - create one (it's free): GitHub - Sign Up

  2. VSCode and Git must be installed on your Computer.


Note: While doing this tutorial, if VSCode asks for sign in, then simply sign in with your GitHub account and give all permissions required.


Setting User details

Note: This is one time process only. Just do it once and you are good to go.

  1. Open Command Prompt (cmd.exe) or GitBash

  2. Set user name:

    git config --global user.name "Your User Name"
  3. Set user email (can be your GitHub account email or any other email address, but using your GitHub email is recommended for linking commits to your GitHub profile):

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

Now you can close the terminal.


Open project folder in VSCode

  1. Open VSCode
  2. Select file > Open Folder

openFolder

  1. now select your Project Folder that you want to upload.

[Note: you must have at least 1 file (even empty) in the folder or its descendants, because git did not track empty folders.

selectFolder


3. Publishing to Github

  1. Select Source Control Option

selectSourceControl

  1. Now click on Publish to GitHub

publishToGitHub

  1. Select option for private or public repository

    private => only you can see the repository

    public => anyone can see the repository

selectPrivatePublic

  1. 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

  1. 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 specifies which files and directories should be excluded from Git and uploading to GitHub.

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

Click on Yes

yes

Now click on three dot and click on push option.

pushChanges

pushChanges

Open your browser.

openBrowser

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

viewChanges

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. How to delete a file

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


6. How to view my Repository

  1. open your gitHub account

openGitHub

  1. Now click on Repositories

repositories

  1. 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)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy