Fully automated Git synchronization system that handles code backup, conflict resolution, and team collaboration with one-click setup.
-
git_advanced_automate.py- Main program with automatic module installation
- Automatic merge/rebase handling and conflict resolution
- Commit message format:
Auto commit: YYYY-MM-DD HH:MM:SS (N files changed)
-
Git_Advanced_Automate.vbs- Background execution (can be registered in startup programs)
-
requirements.txt- List of required Python modules (auto-generated)
-
Git_Automation_System_Beginner_Guide.md- Detailed usage guide for beginners
- Full Auto Initialization: Automatic folder creation, Git init, remote clone
- Auto Module Installation: Automatic check and install of
gitpython,schedule,pywin32 - Bidirectional Sync: Auto pull remote changes + push local changes
- Auto Conflict Resolution: Git Bash vim editor auto-launch on conflicts
- 3-way Merge/Rebase Support: Automatic detection and handling
- Customizable Commit Messages: Configurable prefix, format, file count display
- Scheduling: Configurable auto-sync intervals (default 10 minutes)
- Service Mode: Can be installed as Windows service
- Logging: Detailed automatic operation logs
- Auto-install missing modules and restart program
- Retry with pip upgrade on installation failure
- Automatic requirements.txt generation
- Beginner-friendly error messages and solutions
Modify CONFIG section in git_advanced_automate.py:
REPO_PATH = r"C:\MyProject" # Local repository path
REMOTE_URL = "https://github.com/username/repository.git" # GitHub repository
BRANCH = "main" # Branch name
SYNC_INTERVAL = 10 # Sync interval (minutes)
COMMIT_MESSAGE_TEMPLATE = "Auto commit: {timestamp}" # Commit message format
CUSTOM_COMMIT_PREFIX = "[AUTO]" # Commit message prefix==========================================
μμ μλνλ Git λκΈ°ν μμ€ν μΌλ‘ μ½λ λ°±μ , μΆ©λ ν΄κ²°, ν νμ μ μν΄λ¦μΌλ‘ μ²λ¦¬ν©λλ€.
-
git_advanced_automate.py- λ©μΈ νλ‘κ·Έλ¨ (νμ λͺ¨λ μλ μ€μΉ ν¬ν¨)
- μλ merge/rebase μ²λ¦¬ λ° μΆ©λ ν΄κ²°
- μ»€λ° λ©μμ§ ν¬λ§·:
μλ 컀λ°: YYYY-MM-DD HH:MM:SS (Nκ° νμΌ λ³κ²½)
-
Git_Advanced_Automate.vbs- λ°±κ·ΈλΌμ΄λ μ€νμ© (μμνλ‘κ·Έλ¨ λ±λ‘ κ°λ₯)
-
requirements.txt- νμν Python λͺ¨λ λͺ©λ‘ (μλ μμ±)
-
Git_μλν_μμ€ν _μ΄λ³΄μ_κ°μ΄λ.md- μ΄λ³΄μλ₯Ό μν μμΈ μ¬μ© κ°μ΄λ
- μμ μλ μ΄κΈ°ν: ν΄λ μμ±, Git init, μ격 clone μλ μ²λ¦¬
- νμ λͺ¨λ μλ μ€μΉ:
gitpython,schedule,pywin32μλ νμΈ λ° μ€μΉ - μλ°©ν₯ λκΈ°ν: μ격 λ³κ²½μ¬ν μλ pull + λ‘컬 λ³κ²½μ¬ν push
- μΆ©λ μλ ν΄κ²°: μΆ©λ μ Git Bashμμ vim μλν° μλ μ€ν
- 3-way merge/rebase μ§μ: μν©λ³ μλ κ°μ§ λ° μ²λ¦¬
- μ»€λ° λ©μμ§ μ»€μ€ν°λ§μ΄μ§: μ λμ¬, νμ, νμΌ κ°μ νμ μ€μ κ°λ₯
- μ€μΌμ€λ§: μ€μ κ°λ₯ν κ°κ²©μΌλ‘ μλ λκΈ°ν (κΈ°λ³Έ 10λΆ)
- μλΉμ€ λͺ¨λ: Windows μλΉμ€λ‘ μ€μΉ κ°λ₯
- λ‘κ·Έ κΈ°λ‘: μμΈν μμ λ‘κ·Έ μλ μμ±
- νμ λͺ¨λ μμΌλ©΄ μλ μ€μΉ ν νλ‘κ·Έλ¨ μ¬μμ
- μ€μΉ μ€ν¨ μ pip μ κ·Έλ μ΄λ ν μ¬μλ
- requirements.txt νμΌ μλ μμ±
- μ΄λ³΄μ μΉνμ μ€λ₯ λ©μμ§ λ° ν΄κ²° λ°©λ² μλ΄
git_advanced_automate.py νμΌμ CONFIG μΉμ
μμ :
REPO_PATH = r"C:\MyProject" # λ‘컬 μ μ₯μ κ²½λ‘
REMOTE_URL = "https://github.com/username/repository.git" # GitHub μ μ₯μ
BRANCH = "main" # λΈλμΉλͺ
SYNC_INTERVAL = 10 # λκΈ°ν κ°κ²© (λΆ)
COMMIT_MESSAGE_TEMPLATE = "μλ 컀λ°: {timestamp}" # μ»€λ° λ©μμ§ νμ
CUSTOM_COMMIT_PREFIX = "[AUTO]" # μ»€λ° λ©μμ§ μλΆλΆ