- Introduction
- Why Shared Drives Are Problematic
- Benefits of Using GitHub
- Best Practices for GitHub Usage
- Security Considerations for NHS Wales
- Implementation Guide
- Common Scenarios and Solutions
- Getting Started Checklist
This guide is specifically designed for NHS Wales staff who currently use shared drives to back up code, database scripts, system configurations, and analysis files. It explains why this practice is problematic and provides comprehensive best practices for using GitHub as a superior alternative for version control and file management.
Target Audience: NHS Wales IT staff, developers, data analysts, and anyone managing code or configuration files within the organisation.
- Problem: Multiple versions of files with names like
script_v1.sql,script_v2_final.sql,script_v2_FINAL_ACTUALLY.sql - Impact: Confusion about which version is current, risk of using outdated code
- Real Scenario: A database migration script gets modified by multiple team members, leading to conflicting versions and potential data loss
- Problem: No record of who made what changes and when
- Impact: Impossible to trace the source of bugs or understand the evolution of code
- Compliance Risk: NHS Wales requires audit trails for changes to systems handling patient data
- Problem: Multiple people editing the same file simultaneously
- Impact: Lost work, conflicts, and inconsistent implementations
- Example: Two developers unknowingly modify the same stored procedure, overwriting each other's work
- Problem: Shared drives often have overly broad access permissions
- Impact: Sensitive code and configurations accessible to unauthorized staff
- Risk: Potential exposure of database connection strings, API keys, or patient data access methods
- Problem: Shared drives can fail, and backups may not be comprehensive
- Impact: Complete loss of work and institutional knowledge
- Reality: Network outages or hardware failures can make critical systems inaccessible
- Problem: No connection to deployment pipelines or automated testing
- Impact: Manual, error-prone deployment processes
- Inefficiency: Increased time to market and higher risk of human error
- Every change is tracked with timestamps, author information, and detailed comments
- Ability to revert to any previous version instantly
- Comprehensive audit trail for compliance requirements
- Multiple developers can work on the same codebase without conflicts
- Pull request system ensures code review before changes are merged
- Clear ownership and responsibility for changes
- Granular access controls at repository and branch level
- Integration with NHS Wales Active Directory for authentication
- Encrypted storage and transmission of all data
- GitHub Actions can automate testing, deployment, and compliance checks
- Integration with NHS Wales CI/CD pipelines
- Automatic notifications for changes and issues
- Code and documentation live together
- Markdown support for rich documentation
- Wikis for larger documentation projects
- Multiple redundant backups across geographically distributed data centers
- 99.95% uptime SLA
- Point-in-time recovery capabilities
nhs-wales-project/
├── README.md # Project overview and setup instructions
├── docs/ # Detailed documentation
├── src/ # Source code
├── scripts/ # Database and deployment scripts
├── config/ # Configuration files (no secrets!)
├── tests/ # Test files
└── .gitignore # Files to exclude from version control
- Repositories:
YOUR ORG-[project-name](e.g.,nhs-wales-patient-portal) - Branches:
feature/[description],bugfix/[description],hotfix/[description] - Commits: Clear, descriptive messages explaining what and why
- main: Production-ready code only
- develop: Integration branch for features
- feature branches: Individual features or fixes
- Always use pull requests for merging to main or develop
- Never commit secrets: Use environment variables or Azure Key Vault
- Use .gitignore: Exclude sensitive files, logs, and build artifacts
- Regular access reviews: Quarterly review of repository permissions
- Enable branch protection: Require reviews and status checks
- README.md: Must include setup instructions, dependencies, and contact information
- Code comments: Explain complex business logic and NHS-specific requirements
- Change logs: Document significant changes and their impact on NHS systems
- Public: Open source libraries, general documentation
- Internal: NHS Wales-specific configurations (non-sensitive)
- Confidential: Database schemas, API specifications
- Restricted: Never store patient data or credentials in GitHub
- Use NHS Wales GitHub Enterprise with SSO integration
- Implement least-privilege access principles
- Regular access audits and automated deprovisioning
- All repositories must comply with NHS Digital standards
- Enable audit logging and retention policies
- Regular security scanning of code and dependencies
- Immediate revocation procedures for compromised accounts
- Clear escalation paths for security incidents
- Regular backup verification and recovery testing
-
Inventory existing shared drive content
- Catalog all code, scripts, and configuration files
- Identify file owners and current users
- Assess sensitivity levels and access requirements
-
Plan repository structure
- Group related files into logical repositories
- Define naming conventions and standards
- Create migration timeline and responsibilities
-
Create GitHub repositories
# Example commands for NHS Wales admin gh repo create nhs-wales-database-scripts --private gh repo create nhs-wales-web-portal --private -
Configure security settings
- Enable branch protection rules
- Set up required reviewers
- Configure automated security scanning
-
Initial upload
# Example migration process git init git add . git commit -m "Initial migration from shared drive" git remote add origin https://github.com/nhs-wales/project-name.git git push -u origin main
-
Team onboarding
- Training sessions on Git and GitHub
- Establish code review processes
- Create team documentation and workflows
-
Update development processes
- Modify deployment scripts to use GitHub
- Update documentation and procedures
- Establish monitoring and backup verification
-
Decommission shared drive access
- Archive old shared drive content
- Remove write access to shared drives
- Redirect teams to GitHub repositories
Previous: Scripts scattered across shared drives, no version control Solution:
nhs-wales-database-migrations/
├── README.md
├── migrations/
│ ├── 2024-01-15-patient-table-update.sql
│ ├── 2024-01-20-new-appointment-system.sql
│ └── rollback/
├── procedures/
└── functions/
Previous: Config files with hardcoded credentials on shared drives Solution:
nhs-wales-patient-portal/
├── config/
│ ├── app.config.template # Template with placeholders
│ └── environments/
│ ├── dev.config.template
│ └── prod.config.template
└── deploy/
└── setup-config.ps1 # Script to populate from Key Vault
Previous: R/Python scripts with no documentation or version control Solution:
nhs-wales-health-analytics/
├── README.md # Analysis overview
├── data-sources/ # Documentation of data sources
├── scripts/
│ ├── patient-outcome-analysis.R
│ └── cost-effectiveness-study.py
├── results/ # Generated reports (anonymized)
└── documentation/
└── methodology.md
- Create repository with appropriate naming convention
- Configure repository settings and permissions
- Create initial README.md with project description
- Set up .gitignore file for your technology stack
- Enable branch protection rules
- Review and configure access permissions
- Enable security scanning and alerts
- Set up integration with NHS Wales monitoring
- Document security considerations in README
- Provide Git/GitHub training to team members
- Establish code review processes
- Create team coding standards document
- Set up notification preferences
- Back up current shared drive content
- Upload initial codebase to GitHub
- Update deployment processes
- Test new workflow with small changes
- Archive shared drive content
- Update team documentation
- NHS Wales IT Helpdesk: For technical issues and access requests
- GitHub Enterprise Support: For platform-specific questions
- Documentation: Comprehensive guides available on NHS Wales intranet
Remember: The transition from shared drives to GitHub is not just about technology—it's about adopting modern software development practices that improve quality, security, and collaboration across NHS Wales.