Skip to main content

How to Upload Your First Codebase to GitHub

 

How to Upload Your First Codebase to GitHub

Follow the steps given below to upload your first codebase to GitHub:

  1. First of all, you need to install git on Windows. (Download Git from here)

  1. Install the git in default settings.
  2. After installing git, you need to set your name & e-mail address in the Git configuration. This information will be displayed every time you make a new commit.
  3. Type the below command to configure your name:
    git config --global user.name "Your Name Here"

  1. Similarly, you need to configure your email address by typing the command given below:
    git config --global user.email "Your Email Here"

  1. Now, head over to github.com and create a new repository in which you want to push your project.

  1. Now, right-click on the folder containing the codebase which you want to push to GitHub and select “Open git bash here.” I will be pushing an “index.html” file which is inside my Github Demo folder which you can see in the below animation.

  1. On clicking “Git bash here”, a new git bash terminal window will open!
  2. Now, initialize the local directory as a Git repository by typing:
    git init 
  3. Now, you need to add the files to the staging area (git will only track the files inside this area). Run:
    git add .

    Typing the above command will stage all the files inside the local directory. If you want to stage only one file, type: 

    git add "file-name"

  1. The next step is to commit your staged files by typing:
    git commit -m "Type message of your choice here"

  1. Now, copy the link to the repository which you created in step 6.

  1. Now, type :
    git remote add origin <Paste-Git-URL-Here>

     

  1. The last step is to push your codebase to GitHub. Type the command given below :
    git push origin master

Refresh the repository page and you will see that your files are successfully pushed to Github.

Congratulations on uploading your first codebase on GitHub!

Comments

Popular posts from this blog

Connect and Configure MongoDB in Django Project

  Django, a high-level Python web framework, is well-known for its robustness and versatility. While Django natively supports popular databases like PostgreSQL and MySQL, you may want to integrate a NoSQL database like MongoDB for specific use cases. MongoDB’s flexibility and scalability make it an excellent choice for handling unstructured data. In this blog, we will walk you through the process of connecting MongoDB to a Django project, enabling you to harness the power of NoSQL in your web applications. Prerequisites: Before we begin, ensure you have the following prerequisites in place: Django installed on your system. MongoDB database server installed and running. Basic familiarity with Django project structure and database concepts. Virtual Environment, this is optional but recommended. You check our blog  here . Note:  For this tutorial, we are using our basic  skeleton project  for Django. You can also download the project from  here . Step 1: Insta...

Mongodb-CheatSheet

  All MongoDb commands you will ever need (MongoDb Cheatsheet) In this post, we will see a comprehensive list of all the    MongoDB  commands you will ever need as a MongoDB beginner. This list covers almost all the most used commands in MongoDB. I will assume that you are working inside a collection named 'comments' on a MongoDB    database  of your choice 1. Database Commands View all databases show dbs Copy Create a new or switch databases  use dbName Copy View current Database db Copy Delete Database  db . dropDatabase ( ) Copy 2. Collection Commands Show Collections show collections Copy Create a collection named 'comments' db . createCollection ( 'comments' ) Copy Drop a collection named 'comments' db . comments . drop ( ) Copy 3. Row(Document) Commands Show all Rows in a Collection  db . comments . find ( ) Copy Show all Rows in a Collection (Prettified) db . comments . find ( ) . pretty ( ) Copy Find the first row matching the ob...

How to Activate Windows 10 without Software | Fix free Now 2021

  How to Activate Windows 10 without Software | Fix free Now 2020 Below for more information on windows 10 Find the code for activation below:100% work without crack or Software. Fix it Now. Click on below link to get the code - https://get.msguides.com/windows-10-8... surch on google