Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR] Make source control able to detect git bare repositories #80946

Closed
kiprasmel opened this issue Sep 15, 2019 · 4 comments
Closed

[FR] Make source control able to detect git bare repositories #80946

kiprasmel opened this issue Sep 15, 2019 · 4 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s) info-needed Issue requires more information from poster

Comments

@kiprasmel
Copy link

Hello,

TL;DR:

As far as I'm aware, vscode does not detect git bare repositories, and it'd be useful if it did.


I have a dotfiles setup as described in https://wiki.archlinux.org/index.php/Dotfiles#Tracking_dotfiles_directly_with_Git:

$ git init --bare ~/.dotfiles
$ alias config='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
$ config config status.showUntrackedFiles no

Now, I often merge changes from upstream, and conflicts do come up.
I just like to handle merging with vscode, but so far I haven't been able to do this with my dotfile setup.

Is there something I'm missing, or is there a feature missing that would allow vscode to be aware of git bare repositories and / or git with --git-dir and --work-dir options?

Much thanks!

@joaomoreno
Copy link
Member

joaomoreno commented Sep 17, 2019

As far as I'm aware, vscode does not detect git bare repositories, and it'd be useful if it did.

Why would it be useful? What would you like to use VS Code for, in this case?

@joaomoreno joaomoreno added the info-needed Issue requires more information from poster label Sep 17, 2019
@kiprasmel
Copy link
Author

kiprasmel commented Sep 17, 2019

@joaomoreno Hello, umm, I'm pretty sure I layed out my use case right below the issue's description. Expanding on it:

TL;DR:

What I want to do with vscode is committing changes & managing merge conflicts from upstream. That's it.


Currently I can go and manually open files with changes / merge conflicts.
But if vscode could detect a bare git repo, then I'd just point vscode to it and all the changes would be automatically available in vscode.

To clarify, I have a dotfiles setup in $HOME directory, tracked by git, without having the .git folder as $HOME/.git, but rather as a bare repository as, say, $HOME/.dotfiles, and using the alias config='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME' to manage the dotfiles.

This provides a lot of advantages -- launching git will not work by default, only with the config alias, so you won't accidentally make a commit in the wrong repository if you have other repos in $HOME/*;
other git commands also won't do/affect anything by accident, since you're not using the config alias. If you are - you explicitly know that you're working with the dotfiles setup. More info available @ the arch-wiki


I have a dotfiles setup as described in wiki.archlinux.org/index.php/Dotfiles#Tracking_dotfiles_directly_with_Git:

$ git init --bare ~/.dotfiles
$ alias config='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
$ config config status.showUntrackedFiles no

Now, I often merge changes from upstream, and conflicts do come up.
I just like to handle merging with vscode, but so far I haven't been able to do this with my dotfile setup.

@joaomoreno
Copy link
Member

Got it.

/duplicate #77215

@vscodebot vscodebot bot added the *duplicate Issue identified as a duplicate of another issue(s) label Sep 17, 2019
@kiprasmel
Copy link
Author

kiprasmel commented Sep 17, 2019

Whoops, wasn't able to find the issue before, sorry. Any plans with it anytime soon?

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s) info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

2 participants