Git ile tum commit gecmisini temizleme ve sifirdan yeni commit ile pushlamak

programming, git

# Deleting all commit history in your Git repository

# Navigate to your Git repository
cd path/to/your/repo

# Checkout to a new branch
git checkout --orphan temp_branch

# Add all files to the new branch
git add -A

# Commit all files
git commit -am "Initial commit"

# Delete the main branch
git branch -D main

# Rename the temporary branch to main
git branch -m main

# Force push to update the remote repository
git push -f origin main

Last updated

© 2024 ~ Yunus Emre Ak ~ yEmreAk