Skip to content

[Feature] git init#2296

Closed
jernejp21 wants to merge 2 commits intosourcegit-scm:developfrom
jernejp21:ft_gitinit
Closed

[Feature] git init#2296
jernejp21 wants to merge 2 commits intosourcegit-scm:developfrom
jernejp21:ft_gitinit

Conversation

@jernejp21
Copy link
Copy Markdown

Implemented git init command in GUI. You can create a new git repository and also bare repository.

Icon for new repository can be changed. I couldn't find better.
slika

If the name for the Project Name isn't input, the place holder text will be used for the folder name. The same is for initial Branch Name.
slika

For Bare Repository, branch name is ignored.

Added menu for git init command. Copied cs files from clone, so the functionality still isn't working.
Implemented logic for git init command. Can also init bare repository.

Signed-off-by: jernejp21 <jernejp21@tuta.com>
@love-linger love-linger self-assigned this Apr 24, 2026
@love-linger
Copy link
Copy Markdown
Collaborator

You can just open/drop a folder (not git repository), SourceGit will open the Initialize Repository popup to ask if you want to run git init command under that folder.

If you want to clone a bare repository, you can just use Extra Parameters.

@love-linger love-linger added the not-planned It's not planned in the future label Apr 24, 2026
@jernejp21
Copy link
Copy Markdown
Author

Drag and drop doesn't work for empty folder in version 2026.09. Tested on Windows 11
On Ubuntu 24.04 deb an AppImage it doesn't work at all.
And when you open it from the menu, it won't apply group and bookmark.

slika

@love-linger
Copy link
Copy Markdown
Collaborator

Drag and drop doesn't work for empty folder in version 2026.09

I'm sorry. It's true. You can only trigger the Initialize Repository from Open Local Repository popup.

And when you open it from the menu, it won't apply group and bookmark.

I've tested that Group will be applied to new repository (NOTE: No Group means it will be added to the tree root). I'll push a commit that fixes the bookmark issue

@jernejp21
Copy link
Copy Markdown
Author

Thank you for the explanation.

Too bad my PR didn't get excepted, but it was a nice programming exercise. I will close this PR.

@jernejp21 jernejp21 closed this Apr 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

not-planned It's not planned in the future

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants