Fix 'fatal: refusing to merge unrelated histories' in Bitbucket - Fix Git 'index.lock file exists' Error-How to Handle Large Files in Python Without Memory Errors

Result check
- Keep one change per test run so you know which step helped.
- Undo temporary changes after the issue is confirmed.