← Back to Documentation

How to Push Code

Learn how to push your code to Revolv repositories

Using the Web Interface

  1. Navigate to your repository
  2. Click the "Add Files" button
  3. Upload or create files
  4. Add a commit message
  5. Click "Commit Files"

Using Git CLI

# Clone the repository
git clone http://localhost:3001/username/repo-name.git

# Make changes to your files
# ...

# Stage your changes
git add .

# Commit your changes
git commit -m "Your commit message"

# Push to Revolv
git push origin main

Using Revolv CLI

# Clone a repository
revolv clone username/repo-name

# Make changes and commit as usual
git add .
git commit -m "Your commit message"

# Push using standard Git
git push origin main

Using the API

POST /api/commits
Content-Type: application/json
Authorization: Bearer <your-token>

{
  "repositoryId": "repo-id",
  "message": "Your commit message",
  "files": [
    {
      "path": "file.txt",
      "content": "File content",
      "status": "added"
    }
  ]
}

Need Help?

If you're having trouble pushing code, check out our troubleshooting guide.