workspace-course-topics

Workflow: Git add, commit, and PR

Purpose: Stage your changes, commit them, and create a pull request.


⚠️ Working directory

You must be in: ~/GitHub/econ-ark/ballpark (the repo root)

Run this now:

cd ~/GitHub/econ-ark/ballpark && pwd

Expected output: Path ending in /ballpark

Do not proceed until you see this output.

Git commands must be run from the repository root, not from a subdirectory.


Verify first

1. Verify you’re in a git repository

Run:

git status

Expected: Shows modified/staged files, branch name, etc.

If “fatal: not a git repository”: You’re in the wrong directory.


2. Verify you have changes to commit

git status

Expected: Shows files under “Changes not staged” or “Changes to be committed”

If “nothing to commit, working tree clean”: You haven’t made any changes yet, or you already committed them.


3. Verify you’re on your own branch (not master)

git branch --show-current

Expected: Your branch name (e.g., add-coauthor-yourname)

If you’re on master: Create a new branch first:

git checkout -b your-feature-branch

Steps

A. Review your changes

git diff

This shows what you’ve changed. Press q to exit.


B. Stage your changes

git add .

Or stage specific files:

git add models/We_Would_Like_In_Econ-ARK/YourPaper/

C. Commit

git commit -m "Add [your description of changes]"

D. Push to your fork

git push myfork your-branch-name

If this is your first push for this branch:

git push -u myfork your-branch-name

E. Create a pull request

  1. Go to your fork on GitHub: https://github.com/YOUR-USERNAME/ballpark
  2. You should see a banner: “Compare & pull request”
  3. Click it
  4. Ensure the PR target is econ-ark/ballpark (base) and your fork branch (compare)
  5. Click “Create pull request”

Or use the GitHub CLI:

gh pr create --title "Your PR title" --body "Description of changes"

Alternative: Ask Cursor

You can also ask Cursor to help:

“Git add and commit my changes, then create a pull request.”

Cursor will guide you through the process.