Git Guide Skill
Use this skill when performing any git operations (clone, pull, push, commit, etc.).
Policy: Use git-container for ALL Git Operations
MANDATORY: All git operations MUST be executed inside the git-container Docker container. Never run git directly on the host system.
Container Details
| Property | Value |
|---|---|
| Containers | appropriate git container, alpine, ubuntu, debain, etc |
| Image | ubuntu:22.04 |
| Git Version | 2.34.1 |
| Status | Running (detached) |
Usage Examples
Clone a Repository
docker exec -it git-container git clone <repo-url> <destination>
Pull Latest Changes
docker exec -it git-container git -C /path/to/repo pull
Push Changes
docker exec -it git-container git -C /path/to/repo push
Interactive Shell (for complex operations)
docker exec -it git-container sh
Check Git Status
docker exec -it git-container git -C /path/to/repo status
NAS Storage - MANDATORY Destination
ALL cloned repositories and git artifacts MUST be saved to the NAS SANDBOX:
{{paths.sandbox}}
This is the designated storage location for all git operations. Always ensure:
- Clones are created directly in or copied to the NAS sandbox
- Working directories are set to paths within the NAS
- Artifacts (branches, tags, exports) are stored on the NAS
Workflow
- Identify the target repository URL
- Use
docker exec -it git-container git clone <url> <nas-path> - Navigate to the cloned repository
- Perform git operations as needed
- Always save outputs to the NAS sandbox
Common Commands
| Operation | Command |
|---|---|
| Clone | docker exec -it git-container git clone <url> /nas/path |
| Pull | docker exec -it git-container git -C /nas/repo pull |
| Push | docker exec -it git-container git -C /nas/repo push |
| Status | docker exec -it git-container git -C /nas/repo status |
| Branch | docker exec -it git-container git -C /nas/repo branch |
| Log | docker exec -it git-container git -C /nas/repo log |
| Diff | docker exec -it git-container git -C /nas/repo diff |
Container Maintenance
If the container stops, restart it:
docker start git-container
Verify container is running:
docker ps | findstr git-container
