How to Re-clone a Git Repository Correctly: A Complete Guide for the Hiring Agent Project
To re-clone the interviewstreet/hiring-agent repository correctly, stash or commit your local changes, optionally remove the old directory, clone fresh from GitHub, set up a Python virtual environment, install the package in editable mode with pip install -e ., and verify with hiring-agent score.
Re-cloning a Git repository ensures you have a pristine working copy free from corrupted dependencies or configuration drift. If you are working with the interviewstreet/hiring-agent repository—a Python-based tool for evaluating coding submissions—knowing how to re-clone a Git repository correctly prevents data loss and guarantees a clean development environment exactly as the project expects.
Why Re-cloning May Be Necessary
Sometimes your local clone may have broken dependencies, conflicting git histories, or experimental changes that are easier to reset with a fresh copy. Re-cloning eliminates these issues while preserving important work through Git's stash or branch features, ensuring you start from a verified state defined by the source code in evaluator.py and models.py.
Step-by-Step Guide to Re-cloning the Hiring Agent Repository
Preserve Local Changes with Git Stash or Commit
Before removing anything, protect your work. According to the hiring-agent source structure, you should either commit changes to a feature branch or stash them temporarily:
# Commit to a feature branch (recommended)
git checkout -b my-changes
git add .
git commit -m "My local changes"
# Or temporarily stash them
git stash push -m "backup before re-clone"
Remove the Existing Clone (Optional)
For a truly clean slate, delete the old directory after backing up. This ensures no stale virtual environments or cache files interfere with the new setup:
cd ..
rm -rf hiring-agent # Linux/macOS
# rmdir /s /q hiring-agent # Windows PowerShell
Clone the Repository from GitHub
Use the official URL to get the latest version. For a faster download without full history, use the --depth 1 flag:
git clone https://github.com/interviewstreet/hiring-agent.git
cd hiring-agent
Set Up the Python Virtual Environment
The project relies on specific dependencies defined in setup.cfg and requirements.txt. Create an isolated environment and install in editable mode:
python -m venv .venv
source .venv/bin/activate # macOS/Linux
.venv\Scripts\activate # Windows PowerShell
pip install -e . # Install in editable mode
Configure the Application in config.py
The main configuration resides in config.py. After re-cloning, review settings like DEVELOPMENT_MODE to enable or disable caching and CSV export features as needed for your workflow.
Verify Installation with a Test Run
Confirm the environment works by running the CLI. The score.py module provides the core logic invoked by the following command:
hiring-agent score --model gemini-pro --input sample_questions.json
If this executes without errors, your re-clone and environment setup are correct.
Restore Stashed Changes
If you used git stash earlier, apply your changes back to the new clone:
git stash pop
Key Source Files in the Hiring Agent Repository
Understanding the architecture helps when re-cloning. The repository contains these critical components:
config.py: Central configuration for development mode and caching settingsscore.py: Core scoring logic for evaluationsprompt.py: LLM prompt templates used during evaluationmodels.py: Wrappers for various LLM providers (Gemini, Ollama, etc.)github.py: Utilities for fetching repository data during evaluationevaluator.py: High-level orchestration of the end-to-end evaluation pipeline
Summary
- Stash or commit local changes before deleting the old clone to prevent data loss
- Use
git clone https://github.com/interviewstreet/hiring-agent.gitto get the fresh copy - Install dependencies with
pip install -e .to work in editable mode as defined insetup.cfg - Verify the setup by running
hiring-agent score --model gemini-pro --input sample_questions.json - Review
config.pyafter re-cloning to adjustDEVELOPMENT_MODEand other settings
Frequently Asked Questions
What is the fastest way to clone the Hiring Agent repository?
Use git clone --depth 1 https://github.com/interviewstreet/hiring-agent.git to create a shallow clone that downloads only the latest commit, significantly reducing transfer time if you don't need the full git history. This is ideal when you only need to run the current version of evaluator.py without examining past changes.
How do I preserve uncommitted changes when re-cloning?
Run git stash push -m "backup before re-clone" before removing the old directory. This stores your modifications in Git's reflog. After re-cloning and setting up the new environment, navigate to the repository and run git stash pop to restore your modifications to the fresh working directory.
Why does the Hiring Agent use pip install -e . instead of just requirements.txt?
While requirements.txt lists dependencies, pip install -e . (editable mode) installs the hiring-agent package itself as defined in setup.cfg, allowing you to modify source code in score.py or prompt.py without reinstalling the package after each change. This creates a live link between your edits and the installed CLI commands.
Where is the main configuration stored after re-cloning?
The primary configuration file is config.py in the repository root. This file contains settings for DEVELOPMENT_MODE, caching behavior, and CSV export options that you should review after each fresh clone, as these settings control how models.py and github.py interact with external APIs and local storage.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →