GitHub Archive to HF Sync | Generated by AI
Summary
1. Switched GitHub remote from HTTPS to SSH
- Changed
originfromhttps://github.com/lzwjava/zz.gittogit@github.com:lzwjava/zz.git - Pulled with
git pull --rebase— remote had no new commits, so it was a no-op - GitHub repo
lzwjava/zzis archived (read-only) — this is intentional, stays as-is
2. Authenticated with Hugging Face
huggingface-cliis deprecated → migrated tohfCLI- Logged in with
hf auth login --token hf_... - Token saved to
~/.cache/huggingface/token
3. Set up HF remote
- Initially added HF remote pointing to
datasets/lzwjava/zz— wrong (repo not found, and datasets was incorrect type) - Corrected to models repo:
https://huggingface.co/lzwjava/zz - Added as remote named
hf
4. Resolved diverged histories
- HF repo had 3 independent commits (created via HF web UI/upload):
3dbedadinitial commit0980be1Upload folder using huggingface_hub3894b4dUpdate README
- Local had completely different history (unrelated root commits)
- Force-pushed local
main(8977f51) to HF, overwriting HF’s old commits
Current state
origin → git@github.com:lzwjava/zz.git (archived, read-only)
hf → https://huggingface.co/lzwjava/zz (active, synced)
Local branch main is in sync with HF. Future workflow: git push hf main to sync.