When forking a repository on GitHub, our current process retrieves all branches from the original repository.
Issue
This approach may be inefficient and unnecessary for our use case.
Desired Outcome
We aim to fork only the default branch of the repository, as this is typically sufficient for our work.
GitHub GUI Option
The GitHub web interface provides an option to fork only the default branch (usually the main branch).
JGit Consideration
It's unclear whether JGit, the Java library we use for Git operations, offers a similar option to fork only the default branch.
Proposed Solution
Investigate if JGit provides functionality to fork only the default branch.
If available, implement this feature in our forking process.
If not available through JGit, explore alternative methods to achieve this goal.
Benefits
Efficiency: Reduces unnecessary data transfer and storage.
Simplicity: Maintains a cleaner repository structure in our forks.
Focus: Aligns with our primary need of working with the main branch.
Next Steps
Research JGit documentation and community resources for potential solutions.
If no direct JGit solution exists, consider implementing a custom approach to achieve the desired outcome.
Test and validate any new implementation to ensure it doesn't introduce unforeseen issues.
Conclusion
Optimizing our forking process to retrieve only the main branch will streamline our workflow and improve overall efficiency. This change aligns with best practices for managing forks when only the main branch is needed for development or analysis purposes.
What feature do you want to see added?
Current Situation
When forking a repository on GitHub, our current process retrieves all branches from the original repository.
Issue
This approach may be inefficient and unnecessary for our use case.
Desired Outcome
We aim to fork only the default branch of the repository, as this is typically sufficient for our work.
GitHub GUI Option
The GitHub web interface provides an option to fork only the default branch (usually the main branch).
JGit Consideration
It's unclear whether JGit, the Java library we use for Git operations, offers a similar option to fork only the default branch.
Proposed Solution
Benefits
Next Steps
Conclusion
Optimizing our forking process to retrieve only the main branch will streamline our workflow and improve overall efficiency. This change aligns with best practices for managing forks when only the main branch is needed for development or analysis purposes.
Upstream changes
No response
Are you interested in contributing this feature?
No response