We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 89125f2 commit a66d4bdCopy full SHA for a66d4bd
1 file changed
.github/workflows/reset-preserve-github.yml
@@ -0,0 +1,35 @@
1
+name: Force Reset While Preserving .github
2
+on:
3
+ workflow_dispatch: # You can trigger this manually
4
+
5
+jobs:
6
+ reset-job:
7
+ runs-on: ubuntu-latest
8
9
+ steps:
10
+ - name: Checkout repository
11
+ uses: actions/checkout@v4
12
+ with:
13
+ fetch-depth: 0 # Needed for full history and reset
14
15
+ - name: Backup .github directory
16
+ run: |
17
+ echo "Backing up .github directory..."
18
+ cp -r .github /tmp/github-backup
19
20
+ - name: Force reset to origin/main
21
22
+ echo "Resetting to origin/main..."
23
+ git fetch origin
24
+ git reset --hard origin/main
25
26
+ - name: Restore .github directory
27
28
+ echo "Restoring .github directory..."
29
+ cp -r /tmp/github-backup/. .github/
30
31
+ - name: Show final status
32
33
+ echo "Final git status:"
34
+ git status
35
0 commit comments