Skip to content

Instantly share code, notes, and snippets.

@kasiimh1
Created June 13, 2020 21:12
Show Gist options
  • Save kasiimh1/93f22192777caef9488ce41c5686532f to your computer and use it in GitHub Desktop.
Save kasiimh1/93f22192777caef9488ce41c5686532f to your computer and use it in GitHub Desktop.

Clone the project, e.g. myproject is my project repository:

git clone https://github/heiswayi/myproject.git

Since all of the commits history are in the .git folder, we have to remove it:

cd myproject

And delete the .git folder:

git rm -rf .git

Now, re-initialize the repository:

git init git remote add origin https://github.com/heiswayi/myproject.git git remote -v

Add all the files and commit the changes:

git add --all git commit -am "Initial commit"

Force push update to the master branch of our project repository:

git push -f origin master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment