Skip to content

Commit 2e5502c

Browse files
Add files via upload
1 parent 78e70a3 commit 2e5502c

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

Diff for: clear-commits.sh

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
3+
# Switch to a new orphan branch
4+
git checkout --orphan new_branch
5+
6+
# Stage all changes
7+
git add .
8+
9+
# Commit changes
10+
git commit -m "new_commit"
11+
12+
# Delete the old main branch
13+
git branch -D main
14+
15+
# Rename the new branch to main
16+
git branch -m main
17+
18+
# Force push to the remote main branch
19+
git push -f origin main

0 commit comments

Comments
 (0)