feat/002_init-remote
Raw Download raw file

tissue pull / tissue push

Sync issues with remote repository.

Tissue Commands

# Pull latest changes from remote
tissue pull

# Push local changes to remote
tissue push

Manual Workflow (bash + git)

Pull changes from remote

# Basic pull operation
tissue_pull() {
    # Navigate to issues directory
    cd ../issues 2>/dev/null || {
        echo "Issues directory not found"
        return 1
    }

    # Fetch and merge changes
    echo "Pulling latest issues from remote..."
    git pull origin issues

    # Show what changed
    echo ""
    echo "Recent changes:"
    git log --oneline -5

    cd - > /dev/null
}

tissue_pull

Push changes to remote

# Basic push operation
tissue_push() {
    cd ../issues 2>/dev/null || {
        echo "Issues directory not found"
        return 1
    }

    # Check for uncommitted changes
    UNCOMMITTED=$(git status --porcelain | wc -l)
    if [ "$UNCOMMITTED" -gt 0 ]; then
        echo "You have uncommitted changes:"
        git status --short
        read -p "Commit all changes before pushing? (y/n) " -n 1 -r
        echo
        if [[ $REPLY =~ ^[Yy]$ ]]; then
            git add -A
            git commit -m "Update issues"
        else
            echo "Push cancelled. Please commit your changes first."
            return 1
        fi
    fi

    # Push to remote
    echo "Pushing issues to remote..."
    git push origin issues

    if [ $? -eq 0 ]; then
        echo "✓ Successfully pushed to remote"
    else
        echo "✗ Push failed. You may need to pull first."
    fi

    cd - > /dev/null
}

tissue_push

What tissue does for you:

  1. Handles merge conflicts gracefully
  2. Provides atomic sync operations
  3. Auto-commits before pushing if needed
  4. Shows preview of changes
  5. Creates backups when pulling
  6. Manages branch tracking setup
  7. Provides force options with safety prompts
  8. Optimizes with rebase when appropriate
  9. Gives clear status feedback
  10. Handles authentication seamlessly