Uploading a project to GitHub ⬆️
By Sulamita Ivanov

Posted on 1/12/2024

Uploading a project to GitHub ⬆️

If you’re brand new to git and GitHub, welcome! 👋 We will jump straight into the steps to upload your project to GitHub.

To get started, you will need to create a GitHub account. If you already have one, you can skip this step.

💡 Don’t drag and drop the files, the files won’t always transfer correctly.

Downloading git

Getting started

Leave the new page open while we go to the terminal. We will be using the suggested commands on this page.

Terminal

Open your terminal 💡 Use the search on your computer to find it.

git --version 💡 You can skip this part after the first time.

cd Desktop/folder/my-project Access the location where your project is located, in this case I have it on my desktop and within another folder.

git init Initialize git. This will create a hidden folder called .git within your project folder on your desktop

git status this will show you the files that have been modified, optional.

git add . this will add all the files to something called the staging area or use git add your-file-name if you want to add individual files (ex: git add style.css)

git status to confirm that the files have been added, optional

git commit -m "first commit"

Go back to the page we originally left open on GitHub
Copy the url

OR you can copy it from the page we left open earlier

git remote add origin https://github.com/sulamitaivanov/devblog.git

git push -u origin main 💡 If this is your first time pushing to GitHub, you will need to enter your username and password.

You can now refresh the GitHub page and see your files! 🎉