Skip to the content.

How to Republish Existing Git Project Without Harming Old One

# Copy existing project with a new name
cp -r ~/source/computerNotes/ ~/source/osmankayi.com/

# Dive into it
cd ~/source/osmankayi.com/

# Remove all commits and git-related features
rm -rf .git
# Start git in this project
git init

# Define origin of the project
git remote add origin git@github.com:OsmanKAYI/osmankayi.com.git

# Create new branch called main
git branch -M main

# Add all existing files and folders
git add .

# Create the first commit as *site published*
git commit -m "site published"

# Push everything being in your local pc to github
git push -u origin main