feat: Initialize Git repo when publishing to GitLab
-
Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA
Description
This allows the GitLab extension to push any folder to a new GitLab project without first initializing the repository locally. It will commit all files to a new branch before pushing the project.
Related Issues
Resolves #549 (closed), continuation of !1910 (merged)
How has this been tested?
There's two places this can be tested:
- Opening a folder which is not a valid Git repository (i.e. has no
.git
hidden folder). The command can be accessed from the Source Control tab or via the Command Palette. - Opening a folder with a Git repository, but zero commits on the branch. The command is present as the Publish icon in the bottom left next to the branch name. (this was already the case before this MR, but now it works even without existing commits)
Screenshots (if appropriate)
What CHANGELOG entry will this MR create?
-
fix:
Bug fix fixes - a user-facing issue in production - included in changelog -
feature:
New feature - a user-facing change which adds functionality - included in changelog -
BREAKING CHANGE:
(fix or feature that would cause existing functionality to change) - should bump major version, mentioned in the changelog -
None - other non-user-facing changes
Edited by Lennard Sprong