user6124024
user6124024

Reputation:

Git push new repo based on other repo, start new

I clone git project(MIT) and made some changes in this project update the package.json (name and remove un-neccery things ).

Now when I commit it to my own repo I get the the old package.json with list of all contributors commits etc, I want it to start from scratch for example that my pust will be the first commit, how it can be done?

Upvotes: 0

Views: 68

Answers (1)

Filuren
Filuren

Reputation: 671

You could get rid of the .git directory. I assume you are using Bash so you could (in the project directory) remove that with rm -rf .git and just git init to initialize your own Git history.

Then you could add all the files again git add --all and git commit -m 'Initial commit'. Then just add your own repository as origin with git remote add origin https://github.com/username/repo.git.

Your history would now be clean with your own initial commit.

Upvotes: 3

Related Questions