# How to Re-clone a Git Repository Correctly: A Complete Guide for the Hiring Agent Project

> Learn how to re-clone the interviewstreet/hiring-agent Git repository correctly. Follow these steps to refresh your local environment and avoid common issues.

- Repository: [HackerRank/hiring-agent](https://github.com/interviewstreet/hiring-agent)
- Tags: how-to-guide
- Published: 2026-07-13

---

**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`](https://github.com/interviewstreet/hiring-agent/blob/main/evaluator.py) and [`models.py`](https://github.com/interviewstreet/hiring-agent/blob/main/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:

```bash

# 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:

```bash
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:

```bash
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`](https://github.com/interviewstreet/hiring-agent/blob/main/setup.cfg) and [`requirements.txt`](https://github.com/interviewstreet/hiring-agent/blob/main/requirements.txt). Create an isolated environment and install in editable mode:

```bash
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`](https://github.com/interviewstreet/hiring-agent/blob/main/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`](https://github.com/interviewstreet/hiring-agent/blob/main/score.py) module provides the core logic invoked by the following command:

```bash
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:

```bash
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`](https://github.com/interviewstreet/hiring-agent/blob/main/config.py)**: Central configuration for development mode and caching settings
- **[`score.py`](https://github.com/interviewstreet/hiring-agent/blob/main/score.py)**: Core scoring logic for evaluations
- **[`prompt.py`](https://github.com/interviewstreet/hiring-agent/blob/main/prompt.py)**: LLM prompt templates used during evaluation
- **[`models.py`](https://github.com/interviewstreet/hiring-agent/blob/main/models.py)**: Wrappers for various LLM providers (Gemini, Ollama, etc.)
- **[`github.py`](https://github.com/interviewstreet/hiring-agent/blob/main/github.py)**: Utilities for fetching repository data during evaluation
- **[`evaluator.py`](https://github.com/interviewstreet/hiring-agent/blob/main/evaluator.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.git` to get the fresh copy
- Install dependencies with `pip install -e .` to work in editable mode as defined in [`setup.cfg`](https://github.com/interviewstreet/hiring-agent/blob/main/setup.cfg)
- Verify the setup by running `hiring-agent score --model gemini-pro --input sample_questions.json`
- Review [`config.py`](https://github.com/interviewstreet/hiring-agent/blob/main/config.py) after re-cloning to adjust `DEVELOPMENT_MODE` and 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`](https://github.com/interviewstreet/hiring-agent/blob/main/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`](https://github.com/interviewstreet/hiring-agent/blob/main/requirements.txt) lists dependencies, `pip install -e .` (editable mode) installs the `hiring-agent` package itself as defined in [`setup.cfg`](https://github.com/interviewstreet/hiring-agent/blob/main/setup.cfg), allowing you to modify source code in [`score.py`](https://github.com/interviewstreet/hiring-agent/blob/main/score.py) or [`prompt.py`](https://github.com/interviewstreet/hiring-agent/blob/main/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`](https://github.com/interviewstreet/hiring-agent/blob/main/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`](https://github.com/interviewstreet/hiring-agent/blob/main/models.py) and [`github.py`](https://github.com/interviewstreet/hiring-agent/blob/main/github.py) interact with external APIs and local storage.