Workflow with git saver for Gitlab

Hi,

I have set up git saver for Gitlab successfully. There is one point I am confused and I want to hear how others use git saver.

After setting up git saver, when I edit the local html file, it will push to the remote git repository automatically. This is great, but the local html file is not updated and saved. Then, there are some differences between the local file and remote file. If I refresh the tab, and create more changes, things become disaster as you do not know what the state of remote file is.

Do I need to download the remote html file before making changes? :sweat_smile:

1 Like

Hi, That’s not how it is supposed to be used. Git-savers should be used from the web only.

Which browser do you use?

I didn’t test GitLab for a while, but I’m pretty sure, that browser vendors don’t allow direct saving to a web location from a file:// URI.

I use chrome 101. I open local html file in chrome and it submits the changes to gitlab by gitlab saver. As I described, the local file is not updated.

The TWCore saver handler only saves to one target destination at a time. Thus, you can’t have it save to both GitLab AND also save the local file.

As a workaround:

In the GitLab Saver settings ($:/ControlPanel > Saving > GitLab Saver), clear the Username input. You can leave all the other GitLab Saver settings in place.

By clearing the username input, the GitLab configuration will be incomplete, and the TWCore saver handler will fallback to using whatever local file saver handler you have set up (i.e., Timimi, Download Saver, etc.).

Then, when you are ready to save to GitLab, just go back to the GitLab Saver settings, and enter your username to complete that setup. The TWCore saver handler will then resume saving to GitLab instead of the local file.

-e

OK. That’s interesting. So they have removed that restriction again.

I am only familiar with single file wikis on Github;

I am sure a local file at a file:// location is not updated, but of course the wiki is loaded in the tab and changes can be made there in. It is when the git saver “commits” the changes to the git repository that it is truly saved.

  • Although inside the browser there is a “local copy in browser memory”.
  • The truth is you could provide a download button for a true local copy, but now you could have two “sources of truth” the git repository and the “local download”.

The standard approach is;

  • Access your wiki at the Git repository internet address
  • make changes in browser memory
  • Using the git saver commit changes to the Git repository
    • The only source of truth is the git repository

My repository a link to a single file wiki within the repository Personal Notebook — A TiddlyWiki Essentials Edition which at the moment I am manually uploading from a local file but will add the Github saver credentials once it stabilises and only edit it from the Git repository internet address.

1 Like

Hi @TW_Tones, I am trying to follow this standard approach. I have created my private repo, I have set the saving settings in my local tw, the file is correctly stored in my repo, BUT I have no clue how to directly access my online tw to edit it. What URL should I use? How to get this URL?

Did you set up your Settings : Pages correctly ? There are some links, how to use GL pages.