claude-sonnet-4-20250514-thinking-32k· Anthropic LMArena Human Preference 140K
how to git clone specific branch
- User
how to git clone specific branch
- Assistant
To clone a specific branch from a Git repository, you have a few options:
Option 1: Clone specific branch directly
git clone -b <branch-name> <repository-url>Option 2: Clone only that branch (saves bandwidth)
git clone -b <branch-name> --single-branch <repository-url>Option 3: Clone then switch to the branch
git clone <repository-url> cd <repository-name> git checkout <branch-name>Examples:
# Clone the 'develop' branch git clone -b develop https://github.com/user/repo.git # Clone only the 'feature-branch' (no other branches) git clone -b feature-branch --single-branch https://github.com/user/repo.gitThe
--single-branchflag is useful when you only need that specific branch and want to save time and bandwidth by not downloading the entire repository history of all branches.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.