A Beginner’s Guide to Uploading Your Project on GitHub

Swati Meher
3 min readMay 26, 2024

--

If you’re new to GitHub, uploading your first project might seem a bit daunting. However, once you get the hang of it, you’ll realize it’s a powerful and essential tool for developers. This guide will walk you through the process of uploading your project to GitHub, step by step.

Step 1: Create a GitHub Account

First things first, if you don’t already have a GitHub account, you’ll need to create one. Head over to [GitHub](https://github.com/) and sign up. It’s free and only takes a few minutes.

Step 2: Install Git

GitHub uses Git, a version control system, to manage changes in your project. To interact with GitHub, you need to have Git installed on your computer. You can download it from [here](https://git-scm.com/downloads). Follow the installation instructions for your operating system.

Step 3: Set Up Git

Once Git is installed, you need to configure it with your GitHub account details. Open your terminal (or Command Prompt on Windows) and enter the following commands, replacing the placeholder text with your actual information:

git config - global user.name "Your Name"
git config - global user.email "your-email@example.com"

Step 4: Create a New Repository on GitHub

Now, go to GitHub and create a new repository. Click the “+” icon in the top right corner and select “New repository.” Fill in the details for your repository:

Repository Name: This should be the name of your project.
Description: A short description of what your project does.
Public/Private: Choose whether you want your repository to be public (anyone can see it) or private (only you and people you explicitly share it with can see it).

Finally, click “Create repository.”

Step 5: Initialize Your Project Locally

Navigate to your project folder on your local machine using the terminal. If your project isn’t already in a folder, create one and move your project files into it. Once you’re in your project directory, initialize a new Git repository:

git init

Step 6: Add Your Files

Add your project files to the Git repository you just initialized:

git add .

The `.` adds all files in the current directory to the repository. If you want to add specific files, replace `.` with the file names.

Step 7: Commit Your Changes

Next, commit the files you’ve added with a message describing the changes:

git commit -m "Initial commit"

Step 8: Connect Your Local Repository to GitHub

Go back to the GitHub repository page you created in Step 4. You will see instructions to push an existing repository from the command line. Copy the URL of your GitHub repository, then run the following command in your terminal, replacing `<URL>` with the copied URL:

git remote add origin <URL>

Then, push your local repository to GitHub:

git push -u origin master

Step 9: Verify Your Project on GitHub

Go back to your GitHub repository page and refresh it. You should see all your project files uploaded.

Step 10: Keep Your Repository Updated

As you continue to work on your project, you’ll make changes and updates. To upload these changes to GitHub, follow these steps:

1. Add the changes:

git add .

2. Commit the changes:

git commit -m "Describe your changes"

3. Push the changes:

git push

Closure:

Congratulations! You’ve successfully uploaded your project to GitHub. This is just the beginning. GitHub offers many features to help you collaborate with others, manage your projects, and keep track of changes. As you become more familiar with GitHub, you’ll find it an indispensable tool in your development toolkit.

Happy coding ;)

Sign up to discover human stories that deepen your understanding of the world.

--

--

Swati Meher
Swati Meher

Written by Swati Meher

Data Lover | Let's Learn Together | Hoping to reach 300 Followers here.

No responses yet

Write a response