Two parts: (a) install and authenticate the GitHub CLI, then (b) the full dual-cloud backup pattern — Dropbox + GitHub for code, Dropbox + Overleaf for text.
Important
Most of this is AI-doable. Once Codex or Claude is running, ask it to set your git identity, apply sensible defaults, and create/push repos — Claude Code's auto mode (once you enable it) runs lower-risk commands like these for you and pauses on anything risky. You only need to run the git/gh install and the interactive gh auth login (browser flow) yourself.
- Install git and gh
- Configure
- Backup pattern
- Create a project repo
- What to back up
- Installing more tools
Both AI tools assume you have git and the GitHub CLI (gh) installed and authenticated. gh auth login is the easiest path — it handles HTTPS tokens and SSH keys in one interactive flow, and gives Claude Code / Codex CLI a working gh for PR and issue commands out of the box.
Windows
winget install -e --id Git.Git
winget install -e --id GitHub.cliIf you already installed Git for Windows as the Claude Code companion, the first command is a no-op.
Mac
brew install git ghVerify both are on your PATH:
git --version
gh --versionTwo things: identity + defaults (AI can do these), then gh auth login (you must run yourself — browser flow).
Ask the AI:
"Set my git global identity to 'Your Name' you@example.com and apply sensible defaults: init.defaultBranch=main, pull.rebase=false, push.autoSetupRemote=true."
Or manually
git config --global user.name "Your Name"
git config --global user.email you@example.com
git config --global init.defaultBranch main
git config --global pull.rebase false
git config --global push.autoSetupRemote trueThen authenticate in your terminal (browser opens):
gh auth loginIt asks four things:
- GitHub.com or GitHub Enterprise? → GitHub.com
- Preferred protocol for git operations? → SSH (
ghwill offer to generate and upload a key for you) - Upload your SSH public key to your GitHub account? → Yes
- How would you like to authenticate? → Login with a web browser
Verify:
gh auth status # should show "Logged in to github.com as <you>"
ssh -T git@github.com # should say "Hi <you>! You've successfully authenticated..."
gh repo list # lists your repos — confirms API accessAfter this, git clone git@github.com:..., gh repo create, gh pr create, and AI-tool GitHub integrations all work without further setup.
Recommended dual-cloud setup:
- Code → Dropbox + GitHub. Dropbox = live working folder (instant sync across machines, instant recovery). GitHub = versioned backup (history, branches, sharing, code review).
- Text → Dropbox + Overleaf. Dropbox = local edit space for AI. Overleaf = canonical render and what coauthors see.
┌─────────────────┐
│ You + AI │
│ (local edits) │
└────────┬────────┘
│
┌──────────┴──────────┐
┌─────▼─────┐ ┌─────▼─────┐
│ Dropbox │ │ Dropbox │
│ /Code/ │ │ /Apps/ │
│ │ │ Overleaf │
└─────┬─────┘ └─────┬─────┘
│ │
┌─────▼─────┐ ┌─────▼─────┐
│ GitHub │ │ Overleaf │
│ versioned │ │ canonical │
└───────────┘ └───────────┘
No Dropbox subscription? OneDrive works as a drop-in substitute for the sync layer.
Tell your AI the folder convention. Add this to your project's CLAUDE.md / AGENTS.md so the AI does the right thing automatically:
Use
~/Dropbox/Code/<project>/for code. Copy final outputs (tables, figures, CSV files) to~/Dropbox/Apps/Overleaf/<project>/and edit the.texfiles directly there.
Ask the AI from inside the project folder:
"Create a private GitHub repo for this project, set the remote, and push the initial commit."
(Use "public" instead if the project should be open.) The AI runs gh repo create, scaffolds a .gitignore if you need one, and pushes.
Or manually
cd ~/Dropbox/Code/<project>
gh repo create --source=. --remote=origin --push --private # or --publicToggle visibility later:
gh repo edit --visibility public # or privateTip
Review before you push. In Claude Code, run /code-review to scan your changes for bugs and cleanups before committing. /code-review ultra launches a deep multi-agent cloud review of the current branch (or a PR number) — user-triggered and billed.
Commit:
- Source code
CLAUDE.md/AGENTS.mdand project.claude/settings.json- Notes and drafts
- Small reference data (under ~10 MB)
- Figures, tables, and outputs you reference in writing
Don't commit:
.claude/settings.local.json(already gitignored)- Large data — use Git LFS, S3, or external storage
- Huge intermediate artifacts (regenerate from code as needed)
- Secrets:
.env, API keys, credentials — keep these in.gitignore
Your .gitignore is your friend. Start with github/gitignore templates for your language.
Beyond git and gh, the AI installs any tool the same way — paste a repo URL (anything from awesome-ai-for-economists works) and ask "install this." See Step 4 — Work with research software for the full pattern.
← Back to README — you're at the end of the guide. Time to actually do some research.