06 — Setup: Git & Cursor
Purpose: Create Git repository and clone it in Cursor IDE
Outcome: Have a Git repository set up and cloned in Cursor, ready for development
Audience: PM / Dev / Both
Time: 15-30 minutes
Prerequisites: 05 — Planning - User stories, PRD, and mockups complete
Learning Outcomes
By the end of this chapter, you will be able to:
Create a new Git repository in GitLab or GitHub
Clone the repository in Cursor IDE
Verify the setup is correct
Troubleshoot common setup issues
Jobs-to-Be-Done
When: I have a complete plan (user stories, PRD, mockups) and need to set up version control
I want: To create a Git repository and clone it in Cursor
So that: I can start development with proper version control and Cursor integration
Inputs
User stories, PRD, and mockups from 05 — Planning
GitLab or GitHub account for version control
Cursor IDE installed
Basic understanding of Git
Activities
1. Create Git Repository
Create a new GitLab or GitHub project for your MVP.
Process:
Option A: GitHub
Navigate to GitHub: Go to github.com and sign in
Create New Repository:
Click the "+" icon in the top right
Select "New repository"
Configure Repository:
Repository name: Choose a name that reflects your MVP (e.g.,
mvp-product-name)Description: Brief description of your MVP (optional)
Visibility: Choose Private (recommended for MVP) or Public
Initialize repository:
Optionally check "Add a README file"
Optionally add
.gitignore(choose Node template if using Node.js)Optionally add a license (not necessary for MVP)
Create Repository: Click "Create repository"
Note Repository URL: Copy the repository URL (HTTPS or SSH)
Option B: GitLab
Navigate to GitLab: Go to gitlab.com and sign in
Create New Project:
Click "New project" or the "+" icon
Select "Create blank project"
Configure Project:
Project name: Choose a name that reflects your MVP (e.g.,
mvp-product-name)Project slug: Will auto-populate (can be changed)
Visibility Level: Choose Private (recommended for MVP) or Public
Initialize repository:
Optionally check "Initialize repository with a README"
Create Project: Click "Create project"
Note Repository URL: Copy the repository URL (HTTPS or SSH)
Repository Naming Tips:
Keep it simple and descriptive
Use lowercase and hyphens (e.g.,
mvp-retrospective-tool)Avoid special characters and spaces
Make it easy to remember and identify
💡 Tip: Choose a repository name that reflects your MVP. Keep it simple and descriptive. You can always rename it later if needed.
2. Clone Repository in Cursor
Open Cursor and clone your Git repository.
Process:
Method 1: Clone via Cursor UI
Open Cursor IDE: Launch Cursor application
Clone Repository:
Click "File" → "Clone Repository" (or use keyboard shortcut)
Alternatively, click "File" → "Open Folder" and then clone
Enter Repository URL:
Paste the repository URL you copied
Cursor will detect if it's a Git repository
Choose Clone Location:
Select where to clone the repository on your local machine
Choose a location you can easily find (e.g.,
Documents/Projects/)
Clone Repository:
Click "Clone" or "Open"
Cursor will clone the repository and open it
Verify Clone:
Check that the repository folder is open in Cursor
Verify you can see files (README if you created one)
Method 2: Clone via Command Palette
Open Cursor IDE: Launch Cursor application
Open Command Palette:
Press
Ctrl+Shift+P(Windows/Linux) orCmd+Shift+P(Mac)Type "Git: Clone"
Enter Repository URL:
Paste the repository URL
Press Enter
Choose Clone Location:
Select the folder where you want to clone
Open Repository:
Cursor will ask if you want to open the cloned repository
Click "Open" to open it in Cursor
Method 3: Clone via Terminal (Advanced)
If you prefer using the terminal:
Open Terminal in Cursor:
Press
Ctrl+`(backtick) to open integrated terminal
Navigate to Project Directory:
cd ~/Documents/Projects # or your preferred locationClone Repository:
git clone <repository-url>Open in Cursor:
Use "File" → "Open Folder"
Navigate to the cloned repository folder
Click "Select Folder"
Troubleshooting:
Authentication Issues: If you get authentication errors:
For HTTPS: You may need to set up a personal access token
For SSH: Ensure your SSH key is set up with GitHub/GitLab
See authentication documentation for your Git provider
Repository Not Found:
Verify the repository URL is correct
Ensure you have access to the repository
Check that the repository exists
Permission Denied:
Verify you have read/write access to the repository
Check your Git provider account permissions
3. Verify Setup
Ensure the repository is properly set up and ready for development.
Verification Steps:
Check Repository Status:
Open the integrated terminal in Cursor (
Ctrl+`)Run:
git statusShould show "On branch main" (or "master") and "nothing to commit"
Verify Remote Connection:
Run:
git remote -vShould show your repository URL (origin)
Check File Structure:
Verify you can see the repository files in Cursor's file explorer
If you initialized with README, you should see
README.md
Test Git Operations:
Make a small test change (e.g., edit README.md)
Run:
git status- should show the modified fileRun:
git diff- should show the changes
If Setup is Correct:
✅ Repository is cloned
✅ Cursor is open to the repository folder
✅ Git is working properly
✅ Remote connection is configured
✅ Ready to proceed to
.cursorrulessetup
💡 Tip: If you encounter any issues, check the Cursor documentation or Git provider documentation for troubleshooting steps.
Apply It Now
Task: Create Git repository and clone it in Cursor
Create a new repository in GitLab or GitHub
Choose a descriptive name
Set visibility (Private recommended for MVP)
Optionally initialize with README
Copy the repository URL
Clone repository in Cursor
Use Cursor's clone feature
Choose a local location
Open the cloned repository
Verify setup
Check Git status
Verify remote connection
Ensure repository is properly configured
Artifacts: You'll create:
Git repository (GitLab or GitHub)
Local cloned repository
Repository ready for development
Artifacts
You'll create:
Git repository (remote)
Local cloned repository
Connection between local and remote repository
Worked Example
Situation: Setting up Git repository for a B2B AI SaaS MVP
Git Setup Process:
Repository Creation:
Created GitHub repository named
mvp-retrospective-toolSet visibility to Private
Initialized with README.md
Copied repository URL:
https://github.com/username/mvp-retrospective-tool.git
Clone in Cursor:
Opened Cursor IDE
Used File → Clone Repository
Pasted repository URL
Cloned to
~/Documents/Projects/mvp-retrospective-toolCursor automatically opened the repository
Verification:
Ran
git status- confirmed clean repositoryRan
git remote -v- confirmed remote connectionVerified README.md is visible in Cursor
Ready for next step
Time: 15 minutes total
Checklist
Before proceeding to .cursorrules setup, verify:
Self-Assessment
What should you do after creating the Git repository?
How do you verify the repository is properly cloned?
What should you do if you get authentication errors?
Exit Criteria
You're ready to proceed to .cursorrules setup when:
Dependencies & Next Steps
Prerequisites Completed
05 — Planning - User stories, PRD, and mockups complete
Next Steps
Proceed to 06 — Setup: .cursorrules to configure development rules for Cursor
What This Enables
Completing Git and Cursor setup enables:
Version control for your MVP
Cursor IDE ready for development
Proper repository structure
Foundation for collaborative development
Related Resources
06 — Setup - Return to Setup overview
Git provider documentation (GitHub or GitLab)
💡 Tip: Take time to set up Git properly. Good version control practices will save you time and help you collaborate effectively. 📝 Note: The repository structure will be set up in the next step when you configure
.cursorrulesand create the implementation plan.
Last updated