Created
June 5, 2020 20:46
-
-
Save yusufusta/a6f997167ac0a4a63fe6149a0c3c8fa9 to your computer and use it in GitHub Desktop.
Branch yöntemi ile GitHub commit geçmişini temizleyin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git checkout master | |
| # Ardından bu branchten yeni bir branche ayrılıyoruz. | |
| # --orphan sayesinde master branchinden sadece dosya değişikliklerini alıyoruz, commitleri almıyoruz. | |
| git checkout --orphan latest_branch | |
| # Tüm dosyaları staging'e ekliyoruz. | |
| git add -A | |
| # Commit atıyoruz | |
| git commit -am "commit message" | |
| # master branchini siliyoruz | |
| git branch -D master | |
| # Son oluşturduğumuz latest_branch adlı branchi master olarak yeniden adlandırıyoruz. | |
| git branch -m master | |
| # Force push yaparak GitHub üzerindeki commit history'mizin üzerine yazıyoruz. | |
| git push -f origin master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment