Files
Use Git
Use Git for repository history alongside TimeTravel for file-focused recovery.
What Git is for
Git tracks deliberate versions of a repository: commits, branches, remotes, and reviews. Use it when you need portable history, collaboration with external tools, or a clean release record.
Use Git in a project
- Open a terminal in the project.
- Clone a repository or run
git init. - Configure remotes and credentials as needed.
- Commit meaningful changes.
- Push or pull through the terminal, file tools, or Git browser.
Store deploy keys and access tokens using project secrets or SSH keys, not inside the repository.
Set up and commit from a Codex thread
Open the Codex thread's menu and choose Git browser. On phones, open
Chat tools using the ellipsis button, then choose Thread actions
to open the thread menu. Check the displayed
repository path before using its actions. If the folder is not a repository,
Initialize Git Repo creates one. Ask Agent to Set Up Repo asks the thread's
agent to initialize it, choose a .gitignore, stage appropriate source files,
make the first commit, and summarize inclusions and exclusions.
In the commit selector, choose HEAD (Uncommitted changes (git diff HEAD)) to open Commit changes, then inspect Uncommitted files:
- Commit with a message runs
git commit -adirectly with that message. - Commit with an empty message asks the agent to create the commit.
- Commit with AI Summary asks the agent to commit and write the message; if you supplied text, the prompt requests that text as the first line.
These actions include all tracked changes, not only the file currently shown.
Untracked files are excluded. Use Add beside an untracked file when it should
be included, or Ignore when it belongs in .gitignore; review the resulting
file list before committing. Agent actions need an available Codex thread.
After an agent request, inspect its response and the resulting commit in the Git browser. Sending the request is not proof that a commit succeeded. Review commits and use TimeTravel for file-level recovery as described below.
Transfer saved Git review notes
In the Git browser's commit drawer, open the Review actions ellipsis menu. Export reviews downloads a JSON bundle of saved commit reviews from your account. Its scope is the account's review store, not only the repository or commit currently displayed. Confirm that notes are saved and inspect the bundle before sharing it; unsaved browser drafts are not the export source.
On the receiving account, use Review actions -> Import reviews and select the JSON file. Imported records belong to that signed-in account. They are not shared ownership of the sender's notes. The import keeps an existing record when its update time is equal to or newer than the imported one, and skips invalid records. Check the reported imported/skipped counts and inspect the intended commit's notes afterward.
The bundle transfers review notes and state, not the repository or access to it. Include the repository location and full commit id in your handoff, and confirm that the recipient can open that commit separately. Export/import does not push commits or submit a GitHub review.
Git and TimeTravel
Git and TimeTravel solve different problems. Git is for intentional repository history. TimeTravel is for file-focused recovery and inspection. When a file is in Git, TimeTravel can also make Git revisions easy to browse with a slider, and the Git browser is available when you need full commit context.
Why this matters in CoCalc
CoCalc projects are full Linux environments, so Git works like it does on a normal machine. The difference is that Git is integrated into a collaborative, browser-accessible workspace with terminals, notebooks, TimeTravel, and agents.