Git-based code repositories, such as GitHub, allow researchers to store, manage and share code.
When working with UK Biobank data, it's important to use these repositories responsibly to prevent the accidental sharing of sensitive data or confidential information.
This guide explains the key skills you need, how to set up a repository safely and where to find further training.
1. Before you get started
Before using Git with UK Biobank data, make sure you understand the following:
-
Using
.gitignore: Can you exclude specific files, folders and file types from being tracked? - Managing changes: Do you understand the difference between staging, committing and publishing?
- Removing files: Do you know how to undo changes or remove files that have been staged, committed or published?
- Using Git commands: Are you familiar with the basic commands needed to manage your repository?
If you're new to Git, explore the beginner guides and tutorials listed below before creating your repository.
2. Setting up your repository safely
When creating or managing a Git-based repository:
- Manage access: Check who can view, edit and contribute to your repository.
- Organise your files: Use a clear folder structure to make your code easier to manage.
- Separate code from data: Keep UK Biobank data and sensitive information, including passwords and login credentials, out of your repository.
-
Use safeguards: Tools such as
.gitignoreand Git hooks can help prevent files from being committed accidentally. - Important: These tools provide additional safeguards but do not guarantee that sensitive information cannot be shared. Always check your files before committing or publishing changes.
3. Training and further guidance
The following resources can help you develop your Git and GitHub skills.
Beginner guides
- FreeCodeCamp’s Git & GitHub Guide: An introduction to Git fundamentals, workflows and collaboration.
- GeeksforGeeks Ultimate Guide to Git & GitHub: Guidance on version control, Git commands and repository management.
Video tutorials
- GitHub Tutorial for Beginners [YouTube]: Learn how to create repositories, clone projects, commit changes and manage files.
Official GitHub documentation
- GitHub Docs Learning Resources: Explore GitHub workflows, repository management and collaboration features.
Online courses
- Class Central’s Top Git & GitHub Courses: Explore courses for different experience levels.
- UK Biobank Code repository training: Learn about version control, repository management and good practices for collaborative coding.
Please note: External training resources are not developed or accredited by UK Biobank.
Related guidance
- Guidance for using code repositories when working with UK Biobank data
- Repository management best practices for sensitive data
Related to
Comments
0 comments
Article is closed for comments.