IN SIMPLE STEPS, HOW TO UPLOAD YOUR PROJECT IN GITHUB USING GIT?

Here are the basic steps to push your project to Github using Git:

  1. Initialize a Git repository in your local project directory:

     # CREATE A FOLDER IN YOUR OPERATING SYSTEM AS SHOWN ABOVE
     # PASTE ALL THE FILES TO THAT FOLDER 
    
     # --------- USE THIS COMMAND------------
       $ git init
    
  2. Add all files in the project directory to the repository:

     # AFTER PASTING ALL THE FILES TO THAT FOLDER USE THE BELOW COMMAND
    
     # --------- USE THIS COMMAND------------
     $ git add .
    
  3. Commit the changes with a descriptive message:

     # AFTER ADDING THE FILES 
     # BRIEF OUT WHAT HAS BEEN DONE IN THAT COMMIT SO THAT OTHERS & YOU CAN KNOW.
    
     # --------- USE THIS COMMAND------------
     $ git commit -m "Initial commit"
    
  4. Create a new repository on GitHub and copy the repository URL:

     # NOW GO TO GITHUB 
     # GO TO REPOSITORIES
     # CLICK ON NEW AS SHOWN BELOW
    

     # CLICK ON NEW BUTTON 
     # NOW GIVE A REPOSITORY NAME
    
     #EXAMPLE: I GAVE NAME AS BLOGS
    

  5. Add the GitHub repository as a remote to your local repository:

     # SO AS SHOWN ABOVE A HTTPS LINK WILL BE CREATED
     # COPY THE URL 
    
     # --------- USE THIS COMMAND------------
     $ git remote add origin <repository-URL>
    
     # EXAMPLE: $ git remote add origin https://github.com/k1427/BLOGS.git
    
  6. Push the changes to Github:

     $ git push -u origin master
    
  7. You can verify that your project is now on Github:

I HOPE THIS BLOG HELPES YOU TO GET AN IDEA OF HOW TO PUSH YOUR PROJECTS TO GITHUB.

I will be back again with some amazing content soon!!!.

Did you find this article valuable?

Support VENKATA KARTHIKEYA KRISHNA SAI MANIDEEP GRANDHI by becoming a sponsor. Any amount is appreciated!