New repo of an existing clone including history commits

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.

What you need to do is:

  1. Create a repository on GitHub by going to
  2. Enter a name for your new repository
  3. Select “Public” or “Private”
  4. Click “Create repository”
  5. Follow the instructions under the heading “…or push an existing repository from the command line”

I hope that helps!

See the GitHub help docs about remote repositories.

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:

  1. Create a repository on GitHub (as Lee suggested) and didn’t add any files (neither a readme)
  2. Copy the new repository’s web address
  3. Download and install GitHub Desktop
  4. GitHub Desktop: File > Clone local repository> point to the local repository folder
  5. GitHub Desktop: Paste the repository web address under: Repository > repository Settings… > Remote (tab) > “Prime remote repository (origin) field”
  6. GitHub Desktop: Repository > Push (or Ctrl + P)

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.