-
-
Notifications
You must be signed in to change notification settings - Fork 294
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
Support for submodules #93
Comments
I don't know submodules well. What needs to be changed? |
Apologies for the delay in getting back to you. I haven't spend much time thinking about the implementation nor am I familiar with the simple-git dependency, or the exact mechanics of how the obsidian-git plugin works by itself. So the following will be rather pseudo like.
e.g
After doing the submodule operations I am not particularly skilled at git so might have gotten some terms wrong. If you do believe this is a worthwhile addition but with low priority or interest I can take a crack at adding it however won't have anytime to do so for the upcoming few weeks. |
Thanks a lot for the explanation! I will see what simple-git supports and what I can do. Would you prefer extra commands in Obsidian for submodules, or even for every submodule? Or just update submodules with the existing commands? |
I've just been updating my submodule manually, and would love support to do it automatically - my preferred implementation would be a setting that when toggled enabled performing all operations on submodules by default. Don't know if this is what @XDIJK was envisioning, of course. |
A toggle for hey i've got submodules please run operations on them would also be perfectly fine for my case. Just as @kzhovn suggested! |
Would somebody of you volunteer to test the submodules support? Just replace your |
I just installed the plugin for the first time and was wondering if this functionality exists! I collaborate a lot with non-work colleagues and want to be able to share groups of notes (eg. notes on research papers) but don't want to share the full vault. If I'm reading this correctly it sounds like this has been implemented. Is there a detailed overview of how to run this? |
So far it is not released. I just posted a test version in my comment before. So you need to install that version. In the settings |
@Vinzent03 I gave it a quick test and it seems to be working fine. I haven't tested anything in-depth as in conflicts or more in-depth rebases I also think that might be out of scope for the plugin. Few issues I ran into in regards to git configuration were the following
For me personally the my use-case is covered, anything specific you'd like me test? |
Just saw this error being thrown if the working tree is clean on the submodule but the parent repository working tree isn't:
|
Sorry for the delayed answer. @XDIJK Thanks a lot for testing!
Hmm that's weird, because I run Regarding your error I think it doesn't like to commit no changes. I though't that it is possible, because in non submodule that works. (I guess it still returns a non zero status, but that's otherwise no problem. The |
Agreed I would have to test it on a completely fresh setup then it may have been an issue on my end.
I've been doing some googling and cannot find a way for foreach to return a non-zero exit code. I think the only way to achieve this is by parsing the list of sub modules using |
Maybe your submodule was already detached? If you run I didn't want to use the config file, because that wouldn't be recursive. I check for uncommited changes now in the |
Thanks a bunch for implementing this feature! |
yes this is super awesome! thanks for @XDIJK for proposing and @Vinzent03 for implementing it. this makes obsidian so much more useful as I can have an integrated workflow over all obsidian content, but finely break out sections by audience. I love it. thanks! |
Hi, would like to know if this feature is available on the mobile version of this plug-in? Seems that I am not able to see the |
@Yanksi It's not supported by the underlying library isomorphic-git. Will add this to the README. |
Hi, would like to know more details about your solution. Did you use Thank you. |
Hi @Vinzent03 I find a way to solve commit on no change submodule: Continue looping over submodules with the "git submodule foreach" command after a non-zero exit. Did you done like that? If not hopefully it will give you some new inspiration. |
@rea1shane What exactly is your issue? |
I'm sorry I didn't express clearly. I am new to submodules and would like to know how you handle non-zero status in But just had a new issue, I can't stage submodule changes. Already enable update submodules. Obsidian: Version 1.0.0 (Installer 1.0.0) |
Hi, I was wondering if this is only working folder based - or if this could also work on a tag-base or even a dataview query? I have some work files I want to share - but they are scattered throughout my vault (folders: people, project, meeting-notes) but all of them have a "Project:: Project01" inline key ... so its not a subfolder but more a sub-set of files that i would like to push to a second repository for coworkers to get and update. and to have them ultimately sync back into my vault on request. |
I also use 2 repositories - submodules, and I have the same problem: at some point the repository stopped updating automatically. Through the command line it still works fine... |
Good afternoon,
I'd like to propose the ability to support sub-modules within the obsidian-git plugin.
This would effectively allow you to store multiple directories of notes in multiple repositories.
I think this could be beneficial to people who require strict separation between for example work notes and personal notes, without having to deal with multiple vaults thus instances of obsidian.
The text was updated successfully, but these errors were encountered: