karpathy / karpathy/rendergit

Add branch selection option to rendergit

Open Beginner friendly
#25 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
2.5k
Forks
266
PR merge metrics
No merged PRs in 30d

Description

**Description:**
Currently, `rendergit` always clones the default branch (`main`/`master`) of a repository. It would be very useful to allow users to specify which branch to render.

**Proposed solution:**
- Add a CLI flag (e.g. `--branch `) to `rendergit`.
- When provided, `rendergit` should clone the specified branch instead of the default one.
- If no branch is specified, fallback to the default branch as it works today.

**Example usage:**
```bash
rendergit https://github.com/karpathy/nanoGPT --branch develop
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the rendergit CLI argument parsing and the code that clones the repository. Run the current command with a repository URL, then add the branch option while preserving the existing default-branch behavior when it is omitted. Done means the specified branch is rendered and the no-flag case still works.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.