New repo of an existing clone including history commits #22567
-
Hi, I am a completely new user, this is one of my first attempts to create a git repo and this is actually my first post in the forum; please excuse me if I use any wrong terminology or this is the wrong place to ask or my question has been answered elsewhere, unfortunately I couldn’t find a relevant answer. The problem is that I have a local copy of a git repo that I am trying to clone in my current github account including any history commits performed in the original repo. I am a final year student that worked for a company during my industrial placement year (as part of my studies) where I developed a web-app. During the development I used the company’s internal version control system which is actually the github platform but used only internally in the company. When I completed my placement I kept a copy of the whole code I developed including the git related files and folders (such as .git and .gitignore) During my current graduating year I wish to use my github account to demonstrate the work I performed there and for this I am trying to clone the code folders/files as a repository in my github account. Also, I understand that the commits that I did during the development are recorded in the .git folder and I wonder whether there is any way these commits can be visible in the cloned repo. I hope this question makes sense but please feel free to ask me for any additional information if needed. Many thanks for any response. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
What you need to do is:
I hope that helps! See the GitHub help docs about remote repositories. |
Beta Was this translation helpful? Give feedback.
-
Thank you Lee, this helped. The problem was that the local repository’s git settings and were pointing to the old (original) git address which is internal to the business and I don’t have access anymore. To solve this I used GitHub Desktop to clone the local repository and changed the origin address under settings. These are the steps I took for future reference:
This created an exact clone of my local repo to the new location in GitHub including all commit history with notes and proper dates. Although these commits are not marked as “confirmed” and do not count for my profile’s commits history. |
Beta Was this translation helpful? Give feedback.
What you need to do is:
I hope that helps!
See the GitHub help docs about remote repositories.