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

Local git only? without github? #836

Open
MonsterSe7en opened this issue Jan 13, 2025 · 10 comments
Open

Local git only? without github? #836

MonsterSe7en opened this issue Jan 13, 2025 · 10 comments

Comments

@MonsterSe7en
Copy link

Novice query here

But is it possible to enable version control on my documents without uploading my repository to Github? I want to maintain the file versioning locally on my Desktop

The https://publish.obsidian.md/git-doc/Getting+Started speaks about connecting to GitHub and nothing about a local only version...

Apologies and Thank you in advance.

@Vinzent03
Copy link
Owner

Yeah you can use the plugin without any remote just fine.

@MonsterSe7en
Copy link
Author

I'm unable to find the instructions to configure it locally. I've installed git and skipped the installation of GitHub desktop.

Please point me to the instructions. Any guidance is highly appreciated.

@Vinzent03
Copy link
Owner

There is currently no specific instruction, because there is not really much to setup. If you don't have a git repository yet you can create one via the "Initialize a new repo" command. If you already have one, everything should just work.
Otherwise this page might help for some features: https://publish.obsidian.md/git-doc/Features

@MonsterSe7en
Copy link
Author

MonsterSe7en commented Jan 13, 2025

I appreciate your prompt responses, time, and patience, sir. Thank you!

I've got Git installed, the Obsidian plugin and the Software.

I'm on this screen (Opened Git GUI) ;

image

and navigated to my Obsidian directory as well

image

But I'm unable to find the Initialize a new repo option

A little bit of online searching led me to this; Hope I'm on the correct path!!

https://worldwincoder.com/blog/how-to-set-up-git-for-an-existing-project-a-step-by-step-guide/

@MonsterSe7en
Copy link
Author

You were right!! There's not much, Clicked on Stage Changed and the plugin seems to have picked it up!!

I'm assuming the default settings on the plugin will trigger the automatic versioning?

@MonsterSe7en
Copy link
Author

image

I'm unsure if the plugin is working as intended. The plugin seems to be talking to git but git the application is asking for an identity.

I'm assuming I enter my credentials like the GitHub one suggested below but is there a way to set a local identity that is available on the local machine

I do intend on searching for an answer but your experience is appreciated if you could point me a correct answer

https://superuser.com/questions/1166219/how-do-i-set-my-local-git-identity


is what I was going to say but I seem to have found a solution

Opening the terminal to the location of the repository (In my case F:\Obsidian)

F:\Obsidian>git config user.email "[email protected]"

Requesting you to make the appropriate changes to the documentation (please add to this given your experience in the field, also please let me know if doing things like this opens me up to vulnerabilities, etc...) as this can be confusing to Novice beginners (Some of us Windows users 😹)

@MonsterSe7en
Copy link
Author

Apologies for another a message but I seem to be stuck.... 😶

image

image

I'm assuming the last one isn't really an error

image

@MonsterSe7en
Copy link
Author

#76

Found this page,

Sharing config file information

[core]
	repositoryformatversion = 0
	filemode = true
	bare = false
	logallrefupdates = true
	ignorecase = true
	precomposeunicode = true
	longpaths = true
[gui]
	wmstate = normal
	geometry = 1353x451+5+28 365 203
[remote "origin"]
	url = https://github.com/xxxxxxxxxxxxxx.git
	fetch = +refs/heads/*:refs/remotes/origin/*

@Vinzent03
Copy link
Owner

I expect users to be familiar with git, as git is a more advanced software. But I will think about adding the author info setup to the documentation.
There are no automatics setup by default. Please take a look at the settings.
Please don't just share a screenshot of Obsidian, but also state what you did to bring that up, like which command did you call.
You might need to turn off some settings to not push/pull on commit-and-sync to keep local.

@MonsterSe7en
Copy link
Author

MonsterSe7en commented Jan 14, 2025

Apologies,

The below screenshot, I got as soon as I enabled the extension on Obsidian and clicked on Stage change as on #836 (comment)

I'm assuming clicking on stage change connected git and the git plugin

But then a local identity was created as it was required as on #836 (comment)

Then when I clicked on commit within Obsidian tries to talk to git, but something isn't configured right, so the error message I get on Obsidian is as below (1st one below is the one on the center It's probably asking me to create an upstream branch. and the second one with message: no upstream branch is set

Apologies for another a message but I seem to be stuck.... 😶

image

image

I'm assuming the last one isn't really an error

image


I did try to enter a name in the textbox, hoping that would solve the issue, it did create something on Obsidian's end

image

But when I select BK, I get the message

image


And regarding,

#76

Found this page,

Sharing config file information

[core]
	repositoryformatversion = 0
	filemode = true
	bare = false
	logallrefupdates = true
	ignorecase = true
	precomposeunicode = true
	longpaths = true
[gui]
	wmstate = normal
	geometry = 1353x451+5+28 365 203
[remote "origin"]
	url = https://github.com/xxxxxxxxxxxxxx.git
	fetch = +refs/heads/*:refs/remotes/origin/*

the link #76 is an issue you resolved in 2021
(Edit: I now noticed that he is connected to GitHub, so my issue is different. 😶)

where a person had something similar to my issue, you asked him to share the config file information in .git. Thought I'd share my config information proactively

I'm assuming something needs to be configured in git's end (The application)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants