Engineering @ Webflow Webflow Ex-Upwork, OpenTable, eBay. Side projects at thearea42.com 🚀

git ship: One command to commit and push

Stage, AI commit, push. Done.

⚠️ Warning: Don’t do this for production code. This is for side projects where I rely on AI-generated code. I only use it on feature branches, not main/deploy branches.

I got tired of the git add, git commit -m "...", git push dance. So I set up a one-liner called git ship:

git config --global alias.ship '!f(){ git add -A && oco && git push; }; f'

Now I just run git ship and it:

  1. Stages all changes
  2. Generates a commit message using AI
  3. Pushes to the current branch

The magic is OpenCommit (oco), which looks at your diff and writes a reasonable commit message.

#Local setup with Ollama

I didn’t want to hit OpenAI’s API for every commit, so I pointed it at a local Ollama instance:

# Install OpenCommit
npm i -g opencommit

# Configure to use local Ollama with llama3.2
oco config set OCO_AI_PROVIDER='ollama' OCO_MODEL='llama3.2'
oco config set OCO_API_URL=http://127.0.0.1:11434/api/chat

Make sure Ollama is running locally with the model pulled:

ollama run llama3.2

Note for Mac users: If you see ECONNREFUSED ::1:11434, it’s an IPv6 issue. Ollama listens on IPv4 (127.0.0.1), but Node resolves localhost to IPv6 (::1) first on macOS.

Fix: Use 127.0.0.1 instead of localhost in OCO_API_URL. Also ensure OCO_API_URL is just the base URL—OpenCommit appends its own paths.

That’s it. Fast, free, and offline-capable. I use it dozens of times a day now for side projects.