top of page

GitHub Version Control

​🌐 Step 1: Create a GitHub Account

Go to https://github.com​ and register for an account.
 

📁 Step 2: Create a New Repository on GitHub

  • In GitHub, click the "+" icon (top right) → New repository

  • Fill in the repository name (example: my-project) and set your repository to private for now.

  • ​Don’t check any boxes (don’t add a README, license, or .gitignore)

  • Click Create repository

  • On the next screen, copy the HTTPS URL (example: https://github.com/yourusername/my-project.git

📁 Step 3: "Hide" your API keys and settings

If you are using an API with keys or settings, prompt Cursor to hide any sensitive data, like Firebase settings or OpenAI keys: “Please move all API keys and other sensitive information (e.g., secrets, tokens, passwords) into a `.env` file. Then, make sure that the `.env` file is listed in the `.gitignore` file so it doesn't get committed to your GitHub repo. Also, make sure the app correctly loads variables from the `.env` file using a library like dotenv. For more on key privacy, see this.


💻Step 4: Connect Your Cursor Project to GitHub

If you are a Windows user, see these additional instructions before continuing.
 

Ask Cursor in natural language for help: “Help me connect this project to a new GitHub repo” Cursor will prompt you to run the correct commands, customized to your project.
 

Here are the commands similar to what Cursor will walk you through:​

git init
git remote add origin https://github.com/YOUR-USERNAME/YOUR-REPO.git
git add .
git commit -m "Initial commit"
git branch -M main
git push -u origin main

After running these commands, check your repository at GitHub.com to make sure the version has been saved.
 

💻 Step 5: Commit and Push Changes as you Modify App

After you make significant changes to your app, you should update the copy in your GitHub repository. Ask Cursor to help you through the process. The steps will be similar to the following:
 

git add . 

git commit -m "Your message" 

git push -u origin main

 

Readme File

The readme file in a GitHub repo is the first thing viewers see when they go to your repo. This is where you'll put documentation about your project: an overview of the app and instructions on how to run it. You can edit the Readme file directly at GitHub.

© 2025 PeopleCode.AI.

bottom of page