Git: How to squash all commits, reset history on main branch ( 1 clean commit on master)

Опубликовано: 28 Сентябрь 2024
на канале: Jason Cheung
3,147
24

How to squash all commits into one or reset history on master/main branch into one clean commit.

Commands:
git commit-tree HEAD^{tree} -m "custom message" - this will return a hash.
Copy and paste the hash into
git reset hash

🎵 Track Info
––––––––––––––––––––––––––––––
Skydive by Loxbeats   / loxbeats  
Creative Commons — Attribution 3.0 Unported — CC BY 3.0
Free Download / Stream: http://bit.ly/2uUKEmd
Music promoted by Audio Library    • Skydive – Loxbeats (No Copyright Music)  
––––––––––––––––––––––––––––––