docs: Document dual remote setup and post-commit hook automation

- Added DUAL REMOTE SETUP section with origin (Gitea) and github (GitHub) configuration
- Documented post-commit hook location and purpose (.git/hooks/post-commit)
- Explained auto-sync to github vs manual push to origin workflow
- Added verification commands for sync status checking
- Included automation setup details and testing confirmation
- Updated commit workflow to reflect hook behavior
- Added recent example (de77cfe test commit) to demonstrate automation
This commit is contained in:
mindesbunister
2025-12-05 08:41:58 +01:00
parent de77cfe5fb
commit 12212502bd

View File

@@ -5747,6 +5747,12 @@ if (!enabled) {
- ALWAYS commit changes with descriptive message
- ALWAYS push to remote repository
- User should NOT have to ask for this - it's part of completion
- **DUAL REMOTE SETUP (Dec 5, 2025):**
* **origin**: Production Gitea (ssh://git@127.0.0.1:222/root/trading_bot_v4.git)
* **github**: Copilot PR workflow (https://github.com/mindesbunister/trading_bot_v4.git)
* Post-commit hook automatically pushes to github after every commit
* Manual push to origin required: `git push origin master`
* Verify sync status: `git log --oneline -1 && git remote -v && git branch -vv`
- Commit message format:
```bash
git add -A
@@ -5756,7 +5762,8 @@ if (!enabled) {
- Files changed
- Why the change was needed
"
git push
# Hook auto-pushes to github
git push origin master # Manual push to production
```
- Types:
* `feat:` (new feature)
@@ -5765,7 +5772,16 @@ if (!enabled) {
* `refactor:` (code restructure)
* `critical:` (financial/safety critical fixes)
- This is NOT optional - code exists only when committed and pushed
- **Automation Setup:**
* File: `.git/hooks/post-commit` (executable)
* Purpose: Auto-sync commits to GitHub for Copilot PR workflow
* Status: Active and verified (Dec 5, 2025)
* Testing: Commits auto-appear on github/master
* Manual setup: Copy hook script if cloning fresh repository
- **Recent examples:**
* `test: Verify GitHub auto-sync hook` (de77cfe, Dec 5, 2025)
- Verified post-commit hook working correctly
- All remotes synced (origin/master, github/master)
* `fix: Implement Associated Token Account for USDC withdrawals` (c37a9a3, Nov 19, 2025)
- Fixed PublicKey undefined, ATA resolution, excluded archive
- Successfully tested $6.58 withdrawal with on-chain confirmation