"I got 99 problems but manually cloning Git repos ain't one."
Picture this: I'm sitting there, staring at a spreadsheet containing 50 different GitHub URLs. My project manager wants the code. My hands want to not type git clone 50 times.
I realized I had two choices:
- Succumb to the repetitive stress injury and lose my mind.
- Build a tool so over-engineered and beautiful that it solves the problem forever.
I made one. It's not just a script; it's a statement. It's a portable, dark-mode, batch-processing beast that carries its own Git engine in its pocket.
- Portable Engine: It bundles
MinGit. It doesn't care if you have Git installed. It brings its own party. - Batch Operations: Feed it
.txt,.csv,.xlsxfiles, or just copy-paste a mess of URLs. It devours them. - Anti-Crash Logic: Duplicate folder? We don't crash. We rename it (
repo_updated_DATE). We adapt. We overcome. - The "Boss Report": Generates a fully styled, dark-themed Excel report. Bold headers. Borders. Professionalism.
- UI That Purrs: Cyan/Black aesthetics. Focus-aware scrolling. Progress bars that shift color like a mood ring (Red -> Green).
For the curious developers who want to peek under the hood. Here is how I structured this masterpiece:
RagilmalikGitCloner/
├── src/
│ ├── main_gui.py # The Brain. Handles the UI, threading, and event loop.
│ ├── git_operations.py # The Muscle. Talks to the git binary and moves files.
│ ├── report_generator.py # The Accountant. Stylizes that sweet Excel report.
│ ├── url_parser.py # The Detective. Hunts down URLs in messy text files.
│ ├── git_config.py # The Navigator. Finds where we hid the portable git.
│ └── error_handler.py # The Diplomat. Tells you what went wrong nicely.
├── assets/ # Icons and pretty things.
├── git_portable/ # The secret weapon. A mini Git installation (MinGit).
├── build.bat # The "Make it work" button (Build script).
├── build_exe.spec # The PyInstaller recipe.
└── download_mingit.py # Fetches the engine if you lost it.
You might think, "It's just a wrapper for git clone." Wrong. It's a symphony of logic.
- Input Parsing: When you load a file,
url_parser.pyuses Regex to scrape legitimate GitHub URLs, ignoring your grocery list that you accidentally pasted in the text file. - The Engine Swap:
git_config.pyperforms a runtime check. "Is Git installed?" No? "Is the portable folder here?" Yes. It effectively hot-swaps the system PATH variable for the sub-process so the app uses our Git, not yours. - Non-Blocking UI: The cloning happens in a daemon thread (
main_gui.py). This means while the app is doing heavy lifting, the window remains responsive. You can scroll, minimize, or just admire the progress bar. - Smart Reporting: We don't just dump text.
report_generator.pyusespandasandopenpyxlto craft a native.xlsxfile with cell formatting, color themes, and auto-adjusted column widths.
You don't install it. You unleash it.
- Download the release zip.
- Extract it. (Do not run from inside the zip, or I will judge you).
- Keep the
git_portablefolder next to the executable. They are soulmates. - Double-click
RagilmalikGitCloner.exe.
- Choose File: Pick a list. We support almost anything text-based.
- Manual Input: Paste links directly. One per line.
- Destination: Tell it where the code goes.
- Settings: Adjust the delay slider if you don't want GitHub to think you're a DDoS attack (5 seconds is safe).
- Execute: Click Start. Watch the magic.
So you want to modify perfection? Bold. Here is how you do it.
Prerequisites: Python 3.10+. That's it.
Get the code and the engine.
pip install -r requirements.txt
python download_mingit.py # This grabs the portable git binary for youpython src/main_gui.pyI wrote a script so you don't have to remember PyInstaller flags.
build.batThis runs the spec file, bundles the assets, bundles the Git environment, and spits out a standalone .exe in the dist folder.
Q: "It says Permission Denied!" A: You have the Excel report open. Close it. The code is powerful, but it cannot fight Windows file locks.
Q: "It says Git Not Found!"
A: You moved the .exe away from the git_portable folder. Put them back together. They need to be in the same folder.
Q: "Why is this app so cool?" A: Because I made it.
Open source. Use it. Clone it.
Just remember who saved you from typing git clone 500 times.
Ragilmalik Automating the boring stuff with style.