๐Ÿ”€ Migrating Your Custom Changes to a Clean Fork


๐Ÿ”€ Migrating Your Custom Changes to a Clean LibreChat Fork

You have an old out-of-date project with working changes (styles, icons, etc.) — here's how to safely bring them into your new, properly set-up fork

Cartoon illustration of Git collaboration and merging branches

Visualizing the merge process ✨

  1. ๐Ÿ›ก️ In your OLD project folder – Commit everything
    Make sure all your changes (stylesheets, icons, etc.) are saved. git add .
    git commit -m "๐ŸŽจ My custom styles, icons and tweaks"
    git checkout -b my-custom-changes # optional but safe
  2. ๐Ÿ“‚ In your NEW clean project folder – Add the old one as a remote
    Replace the path with your actual old folder location. git remote add old-project C:/path/to/your/old/LibreChat
    git fetch old-project
  3. ๐Ÿ” Decide: Merge or Cherry-Pick?
    Cherry-pick is cleaner if you only want specific commits.

    Option A – Full merge (quick): git checkout main
    git merge old-project/my-custom-changes # or old-project/main if no branch
    Option B – Cherry-pick (recommended for clean history): git log old-project/my-custom-changes --oneline # copy the commit hashes
    git checkout main
    git cherry-pick <hash1> <hash2> ... # apply only your changes
  4. ⚠️ Resolve conflicts if any
    Git will mark conflicting files. Edit them, then: git add <resolved-files>
    git commit # or git cherry-pick --continue
  5. ๐Ÿงช Test everything!
    Run your LibreChat app and verify styles, icons, and functionality still work perfectly.
  6. ๐Ÿ“ค Push to your fork & clean up git push origin main
    git remote remove old-project # optional cleanup

    Now archive/delete the old project folder — you're all set on the clean one! ๐Ÿš€

๐Ÿ’ก Pro Tip: Going forward, always work on a dev branch in your clean project. Keep main for syncing with upstream.

Your changes are now safe and ready for future upstream updates. Happy customizing! ๐ŸŽ‰

Comments