Subject: Help Needed: Consolidating Repositories Without Losing Contribution History #136493
Replies: 3 comments 2 replies
-
Hi @harivishvanath7 , Check out this guide. I've never done it myself, but the link I've provided shows all the steps to achieve what you're looking for. |
Beta Was this translation helpful? Give feedback.
-
Hi, To merge multiple repositories while preserving your contribution history, you can follow these steps: Clone the existing repositories: Start by cloning all the repositories you want to merge into your local machine. Merge Git histories: For each repository, add it as a remote repository in your new target repository. Follow these steps for each repository: Navigate to the new repository: cd /path/to/new-repo Push to the remote repository: Once you are satisfied with the result, push the new repository with the combined history to GitHub: git push origin main. Delete the old repositories: If everything is in order and the history is preserved, you can delete the old repositories. By following this method, you should retain the full history of your contributions since each commit will be transferred to the new repository. i hope i help :) |
Beta Was this translation helpful? Give feedback.
-
🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as 2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the Thank you for helping bring this Discussion to a resolution! 💬 |
Beta Was this translation helpful? Give feedback.
-
Select Topic Area
Question
Body
Hi GitHub Community,
I currently have 33 repositories in my account, and I'm looking to declutter by consolidating these into a single new repository. My goal is to move (cut-paste) the contents of these repos into the new one while preserving my contribution history (the green spots on my contribution graph).
I attempted to do this by creating a new repository, moving the contents of the old repos, and then deleting the originals. Unfortunately, I noticed that my contribution history was affected, and some contributions were lost.
Could anyone guide me on the correct process to combine multiple repositories into one without losing my contributions? I want to ensure that all my commits and contribution history remain intact after the move.
Any help or suggestions would be greatly appreciated!
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions