Friday, September 22, 2017

How to clean clean github repository

Step 1: remove all history

rm -rf .git

Step 2: reconstruct the Git repo with only the current content

git init
git add .
git commit -m "Initial commit"

Step 3: push to GitHub.

git remote add origin <github-uri>
git push -u --force origin master


https://stackoverflow.com/questions/9683279/make-the-current-commit-the-only-initial-commit-in-a-git-repository

No comments:

Post a Comment

Restore xampp database from backup

steps: stop mysql xampp 1 - create some backup folder "data_1"  2 - from your current xampp/mysql/data folder move core folders an...