Skip to main content
POST
/
v1
/
repos
/
{repo_id}
/
git-receive-pack
Git push operation
curl --request POST \
  --url https://repos.morphllm.com/v1/repos/{repo_id}/git-receive-pack \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/x-git-receive-pack-request'
This response does not have an example.

Git Protocol + Embedding Pipeline

This endpoint handles git push operations and triggers automatic code embedding for semantic search.

Push Flow

  1. Git push initiated - Client sends changes
  2. Authentication - API key validated and translated
  3. Push to Azure DevOps - Changes stored in git provider
  4. Branch detection - Branch name parsed from git protocol
  5. Webhook trigger - Embedding pipeline started asynchronously
  6. Code embedding - Changed files processed and embedded

Automatic Usage

# Standard git
git push origin main

# Or via SDK
import { MorphGit } from 'morphsdk/git';
const morphGit = new MorphGit({ apiKey: 'sk-...' });
await morphGit.push({ dir: './my-project', branch: 'main' });

Embedding Pipeline

After a successful push:
  • Waits 1.5s for Azure to process
  • Fetches commit info and changed files
  • Calls embedding service with apiKeyId for usage attribution
  • Processes files with morph-embedding-v4
  • Stores embeddings for semantic search

Performance

The embedding pipeline runs asynchronously - your push completes immediately without waiting for embeddings.

Authorizations

Authorization
string
header
required

Use your Morph API key as the bearer token. Get your API key at https://morphllm.com/dashboard

Path Parameters

repo_id
string
required

Repository identifier

Example:

"my-project"

Body

application/x-git-receive-pack-request · file

Git protocol push data with branch information

Git protocol pack data including ref updates (binary format)

Response

Push successful, embedding pipeline triggered

Git protocol push result