Kater CLI Share and administer git
kater git push
Publishes your commits since the last snapshot as one change in Kater.
Kater applies every file or none of them, and records the change as one commit by you.
Examples
# Go to your local copycd ~/kater# Publish your commits, described by their commit subjectskater git push# Publish your commits with a message of your ownkater git push --message "Spend by platform for the last 6 months"Options
It also takes --help.
Before it publishes
The last snapshot is the one that your last clone, pull or push recorded.
- Commit first. Only commits are published. When you have uncommitted changes, the command says so, and publishes your commits without them.
- Pull first. When your branch does not hold Kater’s latest snapshot, the command stops and asks you to run
kater git pull. - Finish a merge. It stops while a merge is in progress. Resolve the conflicts,
git addandgit committhem, then push again. - Nothing to publish. With no commits since the last snapshot, it says so and publishes nothing.
When someone changed the same files
Each file goes with the version that it had in your snapshot. When anyone changed one of those files in Kater since then, nothing is published. The command lists those files, pulls Kater’s latest content for you, and exits 1. Resolve any conflicts, git add and git commit them, then run kater git push again.
When you can only view a file
When you cannot change a file, nothing is published. The command lists each file that you can view and not change, says who can change it, and prints the git line that takes your commits to it back, such as git checkout refs/kater/upstream -- connections/snowflake_prod/users/sally@example.com/workspaces/monday_brief && git commit. Run it, then push again to publish the rest. Each clone and pull lists these files in .git/kater-view-only.json, and the VS Code extension opens them read-only. See Files and access.
When a change needs a rename
Other files find a field, a query, a chart, a workspace, an app, a project and an agent’s files by their names. So a push publishes nothing, and prints the kater rename line to run instead, when it:
- takes away a field’s declaration, or a query’s or a chart’s own name, that other files still read;
- moves a file or a folder whose path holds an object’s name, such as a query’s file or a workspace’s folder.
Take the change back with git, push again, then run the kater rename line. It changes every place that names the object, in every folder, in one change, and kater git pull brings it into your copy.
After it publishes
The change becomes one commit in Kater, by you. Your copy records the new snapshot, so you go on working without a new clone. A file that you moved and did not edit moves in Kater too.