Giter VIP home page Giter VIP logo

gitdoc's Introduction

GitDoc ๐Ÿ“„

GitDoc is a Visual Studio Code extension that allows you to automatically commit/push/pull changes on save. This gives you the simplicity of a Google/Word Doc (creating "snapshots" by saving, not by running git commit), but with the richness of git history, and the ability to easily share your work. You can enable these auto-commits during specific periods (e.g. when you're working on a feature branch and want to track the evolution of a change), permanently on specific branches (e.g. you have a docs repo that you want to version like a document), or only for specific files (e.g. auto-commmit *.md files, but nothing else). This allows you to easily switch between "versioning modalities", in order to support the diverse set of use cases that can benefit from being stored in a git repo (e.g. team projects, your personal blog, school work, etc.)

By default, commits are only created for error-free code, which allows you to author and save changes, knowing you aren't accidentally persisting invalid states. Additionally, just because you're auto-commmiting your changes, doesn't mean you lose control over your version history. When needed, you can easily restore, undo, and/or squash versions, without needing to memorize the magic of git ๐Ÿฆธโ€โ™€๏ธ

Getting Started

  1. Install this extension
  2. Run the GitDoc: Enable command, and notice that your status bar now includes a "mirror" icon button. This indicates that GitDoc is enabled ๐Ÿš€
  3. Open a file, make a change, and then save it
  4. Open the Timeline view on the Explorer tab (or run git log), and within 30s, notice that a new commit was created on your behalf
  5. Select the top item in the Timeline view to see the diff of the change you just made
  6. Continue to make changes, knowing that they'll be automatically tracked for you (as long as they don't contain errors) ๐Ÿ‘

From here, you can restore, undo, and/or squash versions from the Timeline, in order to "clean" up/manage your history. When you're done, simply click the GitDoc button in your status bar, or run the GitDoc: Disable command, in order to disable auto-commits.

Auto-commiting

By default, when you enable GitDoc, it will create commits every 30s, whenever there are actually changes. So if you don't make any changes, than it won't make any commits. However, if you're continuously writing code, then it's only going to capture those edits in 30s intervals. This way, you don't generate a massive number of commits, depending on how frequently you save files. If you find that 30s is too short or too long, you can customize this by setting the GitDoc: Auto Commit Delay setting to the appropriate value.

Error Detection

By default, auto-commits are only made when a file is changed, and it doesn't have any pending errors (e.g. issues in the Problems panel with an error severity). This prevents you from creating commits that represent invalid changes, and allows you to install whatever linting/testing/build extensions you want, knowing that they'll "gate" your auto-commits. If you want to suppress commits in the presence of warnings, or ignore problems entirely, and simply always auto-commit, then you can set the GitDoc: Commit Validation Level setting to warning or none respectively.

Auto-commiting specific files

If you'd like to only enable auto-commiting for specific files, you can set the GitDoc: File Pattern setting to a file glob. For example, you could set this to **/*.md in order to auto-commit markdown files, but nothing else. By default, this is set to **/*, which auto-commits changes to any file.

When this setting is set, the GitDoc status bar which only appear when you have a file that is matches it. This way, you can easily tell when you're editing a file that will be auto-committed/pushed.

Auto-saving

When you enable GitDoc, it creates a new commit anytime you save a file. This allows you to control when commits are created, simply be determining when you save. You can save a single file, or multiple files, and all of the changes within a single "save operation" will be committed together. If you'd like to automatically track your changes, without needing to explicitly save, then simply set the Files: Auto Save setting, specifying the exact behavior you'd like (e.g. save every 30s).

Auto-pushing

In addition to automatically creating commits, GitDoc will automatically push your changes to the configured remote. By default, changes will be pushed as soon as you commit them, but this can be configured via the GitDoc: Autopush setting. This can be set to afterDelay in order to push on some sort of frequency (controlled via the GitDoc: Auto Push Delay setting). Additionally, if you don't want to auto-push changes, you can disable this behavior by setting the GitDoc: Autopush setting to off.

By default, GitDoc will perform a "force push", since certain operations such as squashing can actually re-write history. However, if you'd like to change this behavior, you can set the GitDoc: Push Mode to either Force Push with Lease or Push.

Auto-pulling

By default, when you enable GitDoc, it will automatically pull changes from the repo when you 1) open the workspace, and 2) push changes. This ensures that your local copy is in sync with the remote, and attempts to mitigate merge conflics from happening. If you'd like to modify this behavior, you can customize the GitDoc: Auto Pull and GitDoc: Pull on Open settings.

Squashing versions

Auto-committing is useful for tracking unique versions, however, depending on how frequently you save, you could end up creating a significant number of file versions. If a series of versions represent a single logical change, you can "squash" them together by right-clicking the oldest version in the Timeline tree and selecting the Squash Version(s) Above command. You can give the new version a name, and when submitted, the selected version, and all versions above it, will be "squashed" into a single version.

Demystification: Behind the scenes, this command performs a git reset --soft, starting at the commit before the selected one. It then runs git commit -m <message>, where message is the string you specified. This preserves your working directory/index, while "rewritting" the commit history.

Undoing versions

If you made a change, that you want to undo, you can simply open up the Timeline view, right-click the version you want to undo, and select Undo Version. This will create a new version that undos the changes that were made in the selected version. This way, any undo action is actually a "forward edit", that you can then undo again if needed.

Demystification: Behind the scenes, this command simply performs a git revert on the selcted commit. Because this is a "safe" action, you can generally perform it without any problems (including on shared branches), since it doesn't re-write history.

Restoring versions

If you've made a bunch of changes to a file, and want to restore an older version, simply open up the Timeline tree, right-click the desired version, and select Restore Version.

Demystification: Behind the scenes, this command peforms a git checkout -- <file> (on the file that's associated with the selected timeline item), followed by git commit (in order to commit the restoration). This way, the restore is a "forward moving" operation.

Status Bar

Whenever GitDoc is enabled, it will contribute a status bar item to your status bar. This simply indicates that it's enabled, and makes it easier for you to know which "versioning mode" you're in (auto-commit vs. manual commit). Additionally, if you enable auto-pushing, then the status bar will indicate when it's syncing your commits with your repo. If you click the GitDoc status bar item, this will disable GitDoc. This allows you to easily enable GitDoc for a period of time, and then quickly turn it off.

Contributed Commands

When you install the GitDoc extension, the following commands are contributed to the command palette, and are visible when your open workspace is also a git repository:

  • GitDoc: Enable - Enables auto-commits. This command is only visible when GitDoc isn't already enabled.

  • GitDoc: Disable - Disables auto-commits. This command is only visible when GitDoc is enabled.

Contributed Settings

The following settings enable you to customize the default behavior of GitDoc:

  • GitDoc: Auto Commit Delay - Controls the delay in ms after which any changes are automatically committed. Only applies when GitDoc: Enabled is set to true. Defaults to 30000 (30s).

  • GitDoc: Autopull - Specifies whether to automatically pull changes from the current remote. Can be set to one of the following values: afterDelay, onCommit, onPush, or off. Defaults to onPush.

  • GitDoc: Autopull Delay - Controls the delay in ms after which any changes are automatically pulled. Only applies when GitDoc: Auto Pull is set to afterDelay. Defaults to 30000.

  • GitDoc: Autopush - Specifies whether to automatically push changes to the current remote. Can be set to one of the following values: afterDelay, onCommit,or off. Defaults to onCommit.

  • GitDoc: Autopush Delay - Controls the delay in ms after which any commits are automatically pushed. Only applies when GitDoc: Auto Push is set to afterDelay. Defaults to 30000.

  • GitDoc: Commit Message Format - Specifies the moment.js format string to use when generating auto-commit messages. Defaults to LLL.

  • GitDoc: Commit Validation Level - Specifies whether to validate that a file is free of problems, before attempting to commit changes to it. Defaults to error.

  • GitDoc: Commit on Close - Specifies whether to automatically commit changes when you close VS Code. Defaults to true.

  • GitDoc: Enabled - Specifies whether to automatically create a commit each time you save a file.

  • GitDoc: File Pattern - Specifies a glob that indicates the exact files that should be automatically committed. This is useful if you'd like to only auto-commiting specific files, as opposed to an entire branch.

  • GitDoc: Pull on Open - Specifies whether to automatically pull remote changes when you open a repo. Defaults to true.

  • GitDoc: Push Mode - Specifies how changes should be pushed after they're committed. This setting only applies when auto-pushing is enabled. Can be set to one of the following values: forcePushWithLease, forcePush, or push. Defaults to forcePush.

  • GitDoc: Exclude Branches - Specifies a list of branches that should be excluded from auto-commits. This allows you to prevent auto-commits on specific branches, ensuring that your work on these branches remains manual. This is particularly useful for branches where you want to have more control over the commits, such as production or release branches. Defaults to [].

gitdoc's People

Contributors

lostintangent avatar mattferderer avatar rongxin-liu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

gitdoc's Issues

Gitdoc doesn't handle submodules

Hi, my use case is that I'm trying to recreate my Obsidian setup using VSCode & Foam. Then trying to use Gitdoc to replace the Git syncing plugin for Obsidian.

I have my main Obsidian vault with it's folders and a folder inside it with my submodule which is itself a smaller Obsidian vault.

When I make changes to files inside the submodule they aren't committed. From the UI changes that happen in the Source Control pane I think Gitdoc is trying to commit to the main repository not the submodule.

It would be great if Gitdoc could handle this usecase.

`commitOnClose` has no effect

(This may be a duplicate of #18 except that issue also speaks of push behaviour, which I have disabled โ€” so I'm focussing on commit here.)

Basically, the gitdoc.commitOnClose setting seems to have no effect.

I've create a minimal demo repo here which you can clone and play with if that's helpful.

Here's its settings.json:

{
    "gitdoc.autoCommitDelay": 10000,
    "gitdoc.autoPull": "off",
    "gitdoc.autoPush": "off",
    "gitdoc.commitOnClose": true,
    "gitdoc.enabled": true,
    "gitdoc.pullOnOpen": false,
}

So I've disabled all the push/pull stuff, and explicitly told it to commit on close (even though that's supposedly the default behaviour). However it just doesn't seem to. It doesn't matter whether I just quit VSCode outright, or close the tab(s)/window I'm working on.

The repo contains a file scratch.txt which tells the story in more detail (along with the git history I suppose).

Version info

This is on a fresh install of VSCode (on a Mac), where GitDoc is the only installed extension.

  • MacBook Pro (13-inch, M1, 2020)
  • macOS Big Sur 11.5.1
  • VSCode
    • Version: 1.58.2
    • Commit: c3f126316369cd610563c75b1b1725e0679adfb3
    • Date: 2021-07-14T22:10:12.490Z
    • Electron: 12.0.13
    • Chrome: 89.0.4389.128
    • Node.js: 14.16.0
    • V8: 8.9.255.25-electron.0
    • OS: Darwin arm64 20.6.0
  • GitDoc v0.0.8

Provide a way to quickly squash auto-commits

Auto-commits allow you to easily view and revert your work, however they can generate a lot of commits. If a user could easily โ€œsquashโ€ the auto-commits into a single commit, with a specified message, then they could have all of the local/personal benefits of auto-committing, that can be easily consolidated before pushing to the repoโ€™s remote.

Gitdoc is polluting every opened project

Whenever I open any project (even if I haven't enabled GitDoc in it) it auto adds "gitdoc.enabled": false to .vscode/settings.json. This pollutes every repo I open in VS Code.

gitdoc.commitMessageFormat not respecting custom format

Forgive me if this is a failing in my understanding of the config or moment.js, but I attempted to set my settings.json up like so:

{
    "gitdoc.enabled": true,
    "gitdoc.commitMessageFormat": "YYYY-MM-DDTHH:mm:ssZ"
}

And received a commit message like this:

YYYY-08-Aug 24, 202213:2913:29:42-7

Even the simple case of "gitdoc.commitMessageFormat": "YYYY" or "gitdoc.commitMessageFormat": "ISO_8601" don't show up as expected -- they produce commit messages of YYYY and I106O_8601 respectively.

Am I doing something wrong here or is there actually an issue?

[edit] FWIW, I was using this document as my source of formatting: https://momentjs.com/docs/#/parsing/string-format/

Thanks!

Configuration settings aren't enforced in Codespaces devcontainer configuration

I'm building a devcontainer that includes this extension so that my students can have their code automatically pushed to their repository. I have configured the devcontainer.json to include the extention, this works, and apply specific settings to enable the auto save and ignore any problems in the code, this part doesn't work. Below is the full configuration file where you can see I'm using the gitdoc.commitValidationLevel and gitdoc.enabled settings. When I check the settings of a coding environment in Codespaces that is using this devcontainer I can see the extension but the settings aren't set. If I manually change the settings then I see the extension behave how I would like it to.

{
  "image": "mcr.microsoft.com/devcontainers/universal:2",
  "features": {
  },
  "customizations": {
    "vscode": {
      "extensions": [
        "ritwickdey.LiveServer",
        "esbenp.prettier-vscode",
        "vsls-contrib.gitdoc"
      ],
      "settings":{
        "editor.formatOnSave": true,
        "editor.defaultFormatter": "esbenp.prettier-vscode",
        "gitdoc.commitValidationLevel": "none",
        "gitdoc.enabled": true
      }
    }
  }
}

You can see the full repo at https://github.com/bnolan001/CodespacesWebTemplate

Remote extension

when i open vs code, it always show,"remote extension host terminated unexpectedly 3 times within the last 5 minutes."
Version: 1.72.3
Commit: f69482e92e41b84fb15688f3c0d0a1eca1d5bce3
User Agent: Mozilla/5.0 (X11; CrOS x86_64 15054.98.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36
Embedder: codespaces

Extension version: 0.1.0

GitDoc not staying enabled

I don't know if this is related to me using VS Code Insiders, but it seems like GitDoc is not staying enabled. I enabled it once, but it doesn't seem to stick.

I'm going to test saving this setting to my workspace settings which should fix I think.

Add ability to undo a commit but not it's changes

Currently, the Undo Version command performs git revert in order to undo the changes made by the commit. However, there are times when a user might have accidentally saved a change, that they didn't want committed yet. In those situations, it would be ideal to easily undo the commit, but leave the changes. Behind the scenes this would simply perform a git reset on the selected commit.

Gitdoc overwrote changes

I have a notes repository I'm syncing using Gitdoc. Last night I was on another computer and made a bunch of changes to some notes and committed and pushed. This morning when I got back to my first computer, I took some notes in another file, saved, and it synced. Then I noticed that the notes I took last night are gone. If I look at the git reflog, there are no commits from last night. Did Gitdoc do a force push and erase my changes? Is it possible to prevent it from force-pushing?

GitDoc: Enable command does not work immediately

Everytime I enable GitDoc on a repository, it does not work.

Then after some time of playing around and trying out different settings, it may start to work. Or not.

Not sure what the reason for that is.

I know, it's not a settings related issue, though. For example, text files cannot have "errors", so that's not the reason for holding back. All other settings are fine, too.

Still, enabling this extension does not work, as it should.

Commit date is the same for all commits (and wrong)

Very cool extension, but somehow all commits have the exact same date. The generated commit message has the right time, but the commit timestamp is Thu Apr 16 21:27:36 2020 -0700 for all commits. Example from this repo:

commit b5c5231e9595f7eaa0c6bd57d1e2c040e89771ba (HEAD -> master, origin/master)
Author: Thomas Dohmke <SNIP>
Date:   Thu Apr 16 21:27:36 2020 -0700

    April 17, 2020 8:06 PM

commit 8975a3e7913ce4cbd451960856bf05e4aa2230c7
Author: Thomas Dohmke <SNIP>
Date:   Thu Apr 16 21:27:36 2020 -0700

    April 17, 2020 8:05 PM

commit 4eaf1dba1c81b1373d3836f742b5a41daa2702ae
Author: Thomas Dohmke <SNIP>
Date:   Thu Apr 16 21:27:36 2020 -0700

    April 17, 2020 8:05 PM

commit 47c89eedfb7fc95bf0ae955e41366afef5a23baa
Author: Thomas Dohmke <SNIP>
Date:   Thu Apr 16 21:27:36 2020 -0700

    April 17, 2020 8:04 PM

VSCode Info:

Version: 1.44.1
Commit: a9f8623ec050e5f0b44cc8ce8204a1455884749f
Date: 2020-04-11T01:47:00.296Z (1 wk ago)
Electron: 7.1.11
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Darwin x64 19.4.0

Not performing auto-anything, no icon in the status bar

Hi there, thank you very much for the extension! It will save me from a lot of work if I can get it to work!

Unfortunately, though, I really don't know what to say other than that it doesn't work for me. I tried it with the default settings and non-default setting, trying to get it to auto-do stuff every 5s, commit on close etc. None worked. Then I noticed that the icon in the status bar is not visible, which I think might be telling of something wrong. I only saw it once, but it disappeared very quickly after I clicked on it, and I don't know what to do to see it again.

Update, as I'm writing this: It happened again, while I was tinkering with the settings! It did sync the folder with git, but then the icon disappeared again. I don't know what triggered the extension to work, though.

I know I'm not providing much info, but I really don'T know what to do. I'd be happy to provide more info if asked.

Lastly, I'm using this in a LaTeX directory, and I use the auto features to sync the folder with Overleaf via github. Maybe this is relevant somehow?

Pull on workspace open

I have a repo that I use on multiple computers. I wish I could tell GitDoc, "Hey GitDoc! When I open this workspace, I want you to pull the latest changes from remote"

CPU issue GitDoc

Type: Bug

only activation on startup

Extension version: 0.1.0
VS Code version: Code 1.80.2 (Universal) (2ccd690cbff1569e4a83d7c43d45101f817401dc, 2023-07-27T21:05:41.366Z)
OS version: Darwin x64 22.6.0
Modes:

System Info
Item Value
CPUs Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz (12 x 2600)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) 19, 46, 74
Memory (System) 32.00GB (1.02GB free)
Process Argv --crash-reporter-id 78f3c48c-bc48-4786-99d2-976663d5f723
Screen Reader no
VM 0%

Stuck on Pulling

under some circumstances (I haven't been able to figure out what the triggers are yet) GitDoc gets stuck pulling - the status bar indicator goes to GitDoc (Pulling...) and stays there indefinitely. I typically have to disable GitDoc, reรซnable it, and then make a specious change to trigger a checkin.

Do I have something misconfigured?

GitDoc isn't creating a commit on save

This looks like a perfect extension for what I'm after but I'm having trouble configuring it.
I've installed the extension and made the following settings changes (workspace.json):

{"folders": [
...
		{"path": "../../../../dev/notes"}
	],
	"settings": {
		"gitdoc.enabled": true,
		"gitdoc.pushMode": "push",
		"gitdoc.commitValidationLevel": "none",
		"gitdoc.filePattern": "/home/tom/dev/notes**/*"
	}
}

That is because I only want to auto commit for the repo in that specific folder (and I turned off the validation just in case that was the cause).
I see the GitDoc icon in the status bar for the files as I expect, however saving changes doesn't seem to trigger anything.
I can manually commit/push/pull using the VS.Code Source Control and GitLens tabs.
The only other thing I can think of is maybe the branch name is throwing GitDoc off:

tom@sulfur:~/dev/notes$ git st
On branch autocommit
Your branch is up to date with 'origin/autocommit'.

Is there debug/console output for GitDoc I can inspect/include?
Any help diagnosing this would be appreciated.

GitDoc doesn't commit & push on save/close

First of all, thanks for this amazing extension! It's perfect for my purposes, despite some issues which I want to share.

In my experience, GitDoc doesn't push on every commit, it seemingly does it every 30s despite what I set in the settings. This is suboptimal, since I'd like it to push every time I save the file.

It also doesn't always pull on open โ€“ most of the time I have to wait for some time until the changes get pulled.
I've tried editing config.json manually, but unfortunately, that doesn't work either

[Feature Request] Ability to enable gitdoc for a non active vscode project

Hi Team. Thanks for this great tool. I use this to sync my todo, notes and journal across different devices. I have all my notes, daily todo as part of a github repo called planner. Presently, I am able to sync (commit & push) to my github repo when I have planner project open in github.

However, the way I work is with help from VSNotes. This allows me to open my notes & todo from within any of my vscode projects.

Let's say I'm working on a VSCode python project foo, I can still open my notes & todo and update them ( without switching from VSCode project foot to planner. In my current workflow, gitdoc doesn't work as my gitdoc enabled project ( planner) isn't active as a VSCode project.

Is it possible to provide ability to enable gitdoc for a non active vscode project? Pleaset let me know if I'm unclear on my request here. Thanks.

GitDoc gets into loop for pushing

VS Code on windows gets into a loop trying to push at start of opening a clean working tree repository. Using latest version of VS Code and Windows.

Looking for git in: C:\Program Files\Git\cmd\git.exe Using git 2.30.1.windows.1 from C:\Program Files\Git\cmd\git.exe

Raw logs `> git push --force origin master > git push --force origin master > git push --force origin master > git push --force origin master > git push --force origin master > git push --force origin master > git push --force origin master Everything up-to-date > git status -z -u > git symbolic-ref --short HEAD > git push --force origin master Everything up-to-date > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(upstream:track)%00%(objectname) refs/heads/master refs/remotes/master > git for-each-ref --sort -committerdate --format %(refname) %(objectname) %(*objectname) > git remote --verbose > git push --force origin master > git config --get commit.template Everything up-to-date > git status -z -u > git push --force origin master > git symbolic-ref --short HEAD > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(upstream:track)%00%(objectname) refs/heads/master refs/remotes/master Everything up-to-date > git push --force origin master > git for-each-ref --sort -committerdate --format %(refname) %(objectname) %(*objectname) > git remote --verbose > git config --get commit.template > git push --force origin master > git status -z -u Everything up-to-date > git symbolic-ref --short HEAD > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(upstream:track)%00%(objectname) refs/heads/master refs/remotes/master > git push --force origin master Everything up-to-date > git for-each-ref --sort -committerdate --format %(refname) %(objectname) %(*objectname) > git remote --verbose > git config --get commit.template > git push --force origin master > git status -z -u Everything up-to-date > git symbolic-ref --short HEAD > git push --force origin master > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(upstream:track)%00%(objectname) refs/heads/master refs/remotes/master Everything up-to-date > git push --force origin master > git for-each-ref --sort -committerdate --format %(refname) %(objectname) %(*objectname) > git remote --verbose > git config --get commit.template Everything up-to-date > git push --force origin master > git status -z -u > git symbolic-ref --short HEAD Everything up-to-date > git push --force origin master > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(upstream:track)%00%(objectname) refs/heads/master refs/remotes/master Everything up-to-date > git for-each-ref --sort -committerdate --format %(refname) %(objectname) %(*objectname) > git remote --verbose > git push --force origin master > git config --get commit.template > git status -z -u Everything up-to-date > git push --force origin master > git symbolic-ref --short HEAD > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(upstream:track)%00%(objectname) refs/heads/master refs/remotes/master Everything up-to-date > git push --force origin master > git for-each-ref --sort -committerdate --format %(refname) %(objectname) %(*objectname) > git remote --verbose > git config --get commit.template Everything up-to-date > git push --force origin master > git status -z -u > git symbolic-ref --short HEAD > git push --force origin master Everything up-to-date > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(upstream:track)%00%(objectname) refs/heads/master refs/remotes/master > git for-each-ref --sort -committerdate --format %(refname) %(objectname) %(*objectname) > git remote --verbose > git push --force origin master Everything up-to-date > git config --get commit.template Everything up-to-date > git status -z -u > git push --force origin master > git symbolic-ref --short HEAD Everything up-to-date > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(upstream:track)%00%(objectname) refs/heads/master refs/remotes/master > git push --force origin master > git for-each-ref --sort -committerdate --format %(refname) %(objectname) %(*objectname) > git remote --verbose > git config --get commit.template Everything up-to-date > git push --force origin master > git status -z -u Everything up-to-date > git symbolic-ref --short HEAD > git push --force origin master > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(upstream:track)%00%(objectname) refs/heads/master refs/remotes/master Everything up-to-date > git for-each-ref --sort -committerdate --format %(refname) %(objectname) %(*objectname) > git remote --verbose > git push --force origin master > git config --get commit.template > git status -z -u > git push --force origin master Everything up-to-date > git symbolic-ref --short HEAD Everything up-to-date > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(upstream:track)%00%(objectname) refs/heads/master refs/remotes/master > git for-each-ref --sort -committerdate --format %(refname) %(objectname) %(*objectname) > git remote --verbose Everything up-to-date > git config --get commit.template > git status -z -u Everything up-to-date > git symbolic-ref --short HEAD > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(upstream:track)%00%(objectname) refs/heads/master refs/remotes/master > git for-each-ref --sort -committerdate --format %(refname) %(objectname) %(*objectname) > git remote --verbose Everything up-to-date > git config --get commit.template > git status -z -u Everything up-to-date > git symbolic-ref --short HEAD > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(upstream:track)%00%(objectname) refs/heads/master refs/remotes/master Everything up-to-date > git for-each-ref --sort -committerdate --format %(refname) %(objectname) %(*objectname) > git remote --verbose > git config --get commit.template > git status -z -u Everything up-to-date > git symbolic-ref --short HEAD > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(upstream:track)%00%(objectname) refs/heads/master refs/remotes/master > git for-each-ref --sort -committerdate --format %(refname) %(objectname) %(*objectname) > git remote --verbose Everything up-to-date > git config --get commit.template > git status -z -u > git symbolic-ref --short HEAD > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(upstream:track)%00%(objectname) refs/heads/master refs/remotes/master > git for-each-ref --sort -committerdate --format %(refname) %(objectname) %(*objectname) > git remote --verbose > git config --get commit.template `

Gitdoc silently fails to create commits, if git user configuration is missing

When you are using GitDoc set to autocommit, but your git configuration is missing the user.name and user.email setting, not commits can be performed.
This is top be expected, my problem is that GitDoc is failing silently in this case. I would expect some form of error or warning message, to help users with debugging the problem at hand.

Undo Verison not working?

Hi, I'm not sure why the undo version button isn't working. It is a GitDoc setting that I have to enable?

Workspace settings don't save to settings.json

If I make changes to the Workspace with regard to GitDoc settings, shouldn't they save to my .vscode/settings.json?

That's my naive assumption. If not, then feel free to disregard and close!

Feature Request: Separate auto-save brach that follows working branch

It's often I commit on my home machine and forget to commit and push, and have not way to access to the changes. VS Code have cloud changes which I tired to hook to update on change, but its a disaster. I even lost work on restore.

Your project might be able to solve this issue. let say I have brain main, there can be following branch called main-$save$ or somthing. Which get regular update and audit trail without spam the main branch.

Alternative to this can be to have seperate git repo which might be also good idea as the main repo will not bloat in terms of data.

Let me know what you guys think?

Allow squashing a specific range of versions

Currently, GitDoc allows you to combine/collapse all versions above a selected version. However, it would also be useful to allow users to select a specific set of versions and collapse them together. Since the Timeline view allows you to select multiple items, we should explore support for this.

Question about "Auto-commiting specific branches"

How exactly does this differ from auto-committing?

I see in the README

In addition to enabling GitDoc during temporary periods, you can also choose to enable it on specific branches, in order to automatically track your work for as long as you're using the branch

What will the difference be?

Does this mean it won't use the intervals i.e. temporary periods?

Or does this simply mean instead of auto-committing happening for every branch, it's only on specific branches?

Keeps asking for SSH passphrase

Please consider this a draft issue. I will add more info gradually.


GitDoc keeps asking me for the SSH passphrase.

I also (sometimes?) get the notification "Remote repository contains conflicting changes." I presume GitDoc always does a force push, nay? Clicking "Force Push" brings up the prompt for the passphrase again! On entering the passphrase, the passphrase prompt shows up again after a short while.

I use ssh-agent as my ssh agent with the default config. Even in VSCode, once I enter my passphrase, I don't need to enter it again for the rest of the session.


setttings.json

{
	"gitdoc.enabled": true,
}

On L28: I I run git fetch manually and enter the passphrase, it works.
I can confirm the passphrase is correct since I paste it in from my password manager (rather than type it out). Is the passphrase "passed on" correctly?

Logs
2023-07-11 11:57:44.362 [info] Log level: Info
2023-07-11 11:57:44.362 [info] Validating found git in: "git"
2023-07-11 11:57:44.362 [info] Using git "2.41.0" from "git"
2023-07-11 11:57:44.362 [info] > git rev-parse --show-toplevel [6ms]
2023-07-11 11:57:44.362 [info] > git rev-parse --git-dir --git-common-dir [3ms]
2023-07-11 11:57:44.362 [info] Open repository: /home/threadripper/code/zettelkasten
2023-07-11 11:57:44.362 [info] > git rev-parse --show-toplevel [22ms]
2023-07-11 11:57:44.362 [info] > git log --oneline --cherry ...@{upstream} -- [44ms]
2023-07-11 11:57:44.362 [info] > git rev-parse --show-toplevel [17ms]
2023-07-11 11:57:44.362 [info] > git config --get commit.template [36ms]
2023-07-11 11:57:44.364 [info] > git rev-parse --show-toplevel [22ms]
2023-07-11 11:57:44.377 [info] > git rev-parse --show-toplevel [8ms]
2023-07-11 11:57:44.392 [info] > git rev-parse --show-toplevel [10ms]
2023-07-11 11:57:44.399 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) refs/heads/main refs/remotes/main [24ms]
2023-07-11 11:57:44.421 [info] > git status -z -uall [14ms]
2023-07-11 11:57:44.427 [info] > git rev-parse --show-toplevel [28ms]
2023-07-11 11:57:44.464 [info] > git rev-parse --show-toplevel [32ms]
2023-07-11 11:57:44.525 [info] > git rev-parse --show-toplevel [53ms]
2023-07-11 11:57:44.533 [info] > git config --get commit.template [76ms]
2023-07-11 11:57:44.538 [info] > git rev-parse --show-toplevel [6ms]
2023-07-11 11:57:44.556 [info] > git rev-parse --show-toplevel [11ms]
2023-07-11 11:57:44.604 [info] > git rev-parse --show-toplevel [41ms]
2023-07-11 11:57:44.611 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) refs/heads/main refs/remotes/main [57ms]
2023-07-11 11:57:44.619 [info] > git rev-parse --show-toplevel [9ms]
2023-07-11 11:57:45.161 [info] > git status -z -uall [543ms]
2023-07-11 11:57:45.161 [info] > git check-ignore -v -z --stdin [3ms]
2023-07-11 11:57:45.162 [info] > git rev-parse --show-toplevel [537ms]
2023-07-11 11:57:46.535 [info] > git fetch [2253ms]
2023-07-11 11:57:46.535 [info] Missing or invalid credentials.
Skip silent fetch commands
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
2023-07-11 11:57:46.561 [info] > git config --get commit.template [4ms]
2023-07-11 11:57:46.600 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) refs/heads/main refs/remotes/main [18ms]
2023-07-11 11:57:46.618 [info] > git status -z -uall [6ms]
2023-07-11 11:57:47.311 [info] > git check-ignore -v -z --stdin [12ms]
2023-07-11 11:58:01.392 [info] > git pull --tags [17064ms]
2023-07-11 11:58:01.467 [info] > git config --get commit.template [36ms]
2023-07-11 11:58:01.468 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) refs/heads/main refs/remotes/main [4ms]
2023-07-11 11:58:01.489 [info] > git status -z -uall [4ms]
2023-07-11 11:58:04.233 [info] > git show --textconv :drafts/til-html-media.md [40ms]
2023-07-11 11:58:04.241 [info] > git ls-files --stage -- /home/threadripper/code/zettelkasten/drafts/til-html-media.md [33ms]
2023-07-11 11:58:04.274 [info] > git cat-file -s e756c776de043982f3a1a1fc9755f6ffb6dc8253 [19ms]
2023-07-11 11:58:46.560 [info] > git config --get commit.template [13ms]
2023-07-11 11:58:46.561 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) refs/heads/main refs/remotes/main [2ms]
2023-07-11 11:58:46.576 [info] > git status -z -uall [3ms]
2023-07-11 11:58:51.616 [info] > git config --get commit.template [18ms]
2023-07-11 11:58:51.617 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) refs/heads/main refs/remotes/main [3ms]
2023-07-11 11:58:51.636 [info] > git status -z -uall [3ms]
2023-07-11 11:59:21.674 [info] > git add -A -- /home/threadripper/code/zettelkasten/drafts/til-html-media.md [5ms]
2023-07-11 11:59:21.734 [info] > git config --get commit.template [29ms]
2023-07-11 11:59:21.736 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) refs/heads/main refs/remotes/main [3ms]
2023-07-11 11:59:21.762 [info] > git status -z -uall [5ms]
2023-07-11 11:59:21.806 [info] > git -c user.useConfigOnly=true commit --quiet --allow-empty-message --file - --allow-empty-message [21ms]
2023-07-11 11:59:21.825 [info] > git config --get commit.template [4ms]
2023-07-11 11:59:21.842 [info] > git config --get commit.template [3ms]
2023-07-11 11:59:21.857 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) refs/heads/main refs/remotes/main [2ms]
2023-07-11 11:59:21.872 [info] > git status -z -uall [3ms]
2023-07-11 11:59:21.898 [info] > git log --oneline --cherry main...main@{upstream} -- [1ms]
2023-07-11 11:59:23.175 [info] > git ls-files --stage -- /home/threadripper/code/zettelkasten/drafts/til-html-media.md [2ms]
2023-07-11 11:59:23.202 [info] > git cat-file -s b3b3daae85adbef5042c6d90a0dbc0eadc7fbea3 [3ms]
2023-07-11 11:59:23.232 [info] > git show --textconv :drafts/til-html-media.md [6ms]
2023-07-11 11:59:36.358 [info] > git pull --tags origin main [14446ms]
2023-07-11 11:59:36.358 [info] From github.com:threadripper/zettelkasten
 * branch            main       -> FETCH_HEAD
2023-07-11 11:59:37.603 [info] > git ls-files --stage -- /home/threadripper/code/zettelkasten/drafts/til-html-media.md [2ms]
2023-07-11 11:59:37.631 [info] > git cat-file -s b3b3daae85adbef5042c6d90a0dbc0eadc7fbea3 [15ms]
2023-07-11 11:59:37.646 [info] > git show --textconv :drafts/til-html-media.md [1ms]
2023-07-11 11:59:42.992 [info] > git push origin main:main [6598ms]
2023-07-11 11:59:42.992 [info] To github.com:threadripper/zettelkasten.git
   e84c6a9..624bb39  main -> main
2023-07-11 11:59:43.052 [info] > git config --get commit.template [27ms]
2023-07-11 11:59:43.054 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) refs/heads/main refs/remotes/main [3ms]
2023-07-11 11:59:43.091 [info] > git status -z -uall [16ms]
2023-07-11 11:59:43.144 [info] > git config --get commit.template [15ms]
2023-07-11 11:59:43.162 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) refs/heads/main refs/remotes/main [3ms]
2023-07-11 11:59:43.198 [info] > git status -z -uall [20ms]
2023-07-11 11:59:43.220 [info] > git log --oneline --cherry main...main@{upstream} -- [3ms]
2023-07-11 11:59:45.885 [info] > git ls-files --stage -- /home/threadripper/code/zettelkasten/drafts/til-html-media.md [1ms]
2023-07-11 11:59:45.901 [info] > git cat-file -s b3b3daae85adbef5042c6d90a0dbc0eadc7fbea3 [2ms]
2023-07-11 11:59:45.917 [info] > git show --textconv :drafts/til-html-media.md [2ms]
2023-07-11 11:59:49.776 [info] > git pull --tags [6541ms]
2023-07-11 11:59:49.832 [info] > git config --get commit.template [26ms]
2023-07-11 11:59:49.834 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) refs/heads/main refs/remotes/main [4ms]
2023-07-11 11:59:49.861 [info] > git status -z -uall [4ms]
2023-07-11 11:59:50.673 [info] > git ls-files --stage -- /home/threadripper/code/zettelkasten/drafts/til-html-media.md [4ms]
2023-07-11 11:59:50.695 [info] > git cat-file -s b3b3daae85adbef5042c6d90a0dbc0eadc7fbea3 [2ms]
2023-07-11 11:59:50.712 [info] > git show --textconv :drafts/til-html-media.md [2ms]
2023-07-11 11:59:57.810 [info] > git push --force origin main [7924ms]
2023-07-11 11:59:57.810 [info] [email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
2023-07-11 12:00:03.889 [info] > git config --get commit.template [14ms]
2023-07-11 12:00:03.906 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) refs/heads/main refs/remotes/main [2ms]
2023-07-11 12:00:03.921 [info] > git status -z -uall [3ms]
2023-07-11 12:00:19.889 [info] > git add -A -- /home/threadripper/code/zettelkasten/.vscode/settings.json /home/threadripper/code/zettelkasten/drafts/til-html-media.md [2ms]
2023-07-11 12:00:19.918 [info] > git config --get commit.template [15ms]
2023-07-11 12:00:19.919 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) refs/heads/main refs/remotes/main [1ms]
2023-07-11 12:00:19.936 [info] > git status -z -uall [3ms]
2023-07-11 12:00:19.961 [info] > git -c user.useConfigOnly=true commit --quiet --allow-empty-message --file - --allow-empty-message [7ms]
2023-07-11 12:00:19.978 [info] > git config --get commit.template [3ms]
2023-07-11 12:00:20.015 [info] > git config --get commit.template [21ms]
2023-07-11 12:00:20.035 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) refs/heads/main refs/remotes/main [3ms]
2023-07-11 12:00:20.057 [info] > git status -z -uall [5ms]
2023-07-11 12:00:20.090 [info] > git log --oneline --cherry main...main@{upstream} -- [3ms]
2023-07-11 12:00:21.404 [info] > git ls-files --stage -- /home/threadripper/code/zettelkasten/drafts/til-html-media.md [5ms]
2023-07-11 12:00:21.433 [info] > git cat-file -s 08826b236422cbe6581ce0c1a1ab6d53fa194503 [4ms]
2023-07-11 12:00:21.453 [info] > git show --textconv :drafts/til-html-media.md [1ms]
2023-07-11 12:00:26.685 [info] > git pull --tags origin main [6579ms]
2023-07-11 12:00:26.685 [info] [email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
2023-07-11 12:00:26.700 [info] > git config --get commit.template [2ms]
2023-07-11 12:00:26.715 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) refs/heads/main refs/remotes/main [2ms]
2023-07-11 12:00:26.736 [info] > git status -z -uall [3ms]
2023-07-11 12:00:26.785 [info] > git config --get commit.template [2ms]
2023-07-11 12:00:26.802 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) refs/heads/main refs/remotes/main [3ms]
2023-07-11 12:00:26.825 [info] > git status -z -uall [3ms]
2023-07-11 12:00:26.851 [info] > git log --oneline --cherry main...main@{upstream} -- [2ms]
2023-07-11 12:00:29.593 [info] > git ls-files --stage -- /home/threadripper/code/zettelkasten/drafts/til-html-media.md [2ms]
2023-07-11 12:00:29.610 [info] > git cat-file -s 08826b236422cbe6581ce0c1a1ab6d53fa194503 [3ms]
2023-07-11 12:00:29.702 [info] > git show --textconv :drafts/til-html-media.md [2ms]
2023-07-11 12:00:50.984 [info] > git pull --tags [24116ms]
2023-07-11 12:00:50.985 [info] [email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
2023-07-11 12:00:51.018 [info] > git config --get commit.template [4ms]
2023-07-11 12:00:51.038 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) refs/heads/main refs/remotes/main [3ms]
2023-07-11 12:00:51.058 [info] > git status -z -uall [5ms]
2023-07-11 12:00:52.299 [info] > git ls-files --stage -- /home/threadripper/code/zettelkasten/drafts/til-html-media.md [4ms]
2023-07-11 12:00:52.332 [info] > git cat-file -s 08826b236422cbe6581ce0c1a1ab6d53fa194503 [3ms]
2023-07-11 12:00:52.352 [info] > git show --textconv :drafts/til-html-media.md [3ms]
2023-07-11 12:00:53.364 [info] > git fetch [2288ms]
2023-07-11 12:00:53.365 [info] Missing or invalid credentials.
Skip silent fetch commands
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
2023-07-11 12:00:53.380 [info] > git config --get commit.template [1ms]
2023-07-11 12:00:53.395 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) refs/heads/main refs/remotes/main [2ms]
2023-07-11 12:00:53.412 [info] > git status -z -uall [3ms]

Squashing Versions

I'm sure this is probably 100% user error, but when I click on a commit and select Squash Version(s) Above, there is no prompt to give a new name to the "collapsed version."

Note: My Timeline window shows "File Saved" followed by the "Commit Name," as opposed to the video on the VSC extension page.

Any tips on how I can troubleshoot this to make the feature work? Additionally, instead of showing GitDoc in the bottom bar, it shows an icon with a double-sided arrow and shows "GitDoc: Auto-commiting files on save." when I hover over it. (Not sure if this helps lol)

Commit/push on workspace close

I understand the intervals (auto-commit every 30 secs), but I wish there were a checkbox to say, "If I close the workspace, and it's dirty, auto-commit and auto-push for me."

This is in the event that I make changes and close the workspace before it hits the next interval.

[Feature Request] Option to pull with --rebase when possible for a cleaner history

My team would be interested in a pull strategy explained in this short video despite the clickbaity title: https://www.youtube.com/watch?v=xN1-2p06Urc

The idea basically is to minimize the number of merge commits in our GitDoc powered knowledge base by first attempting the pulling of changes with git pull --rebase. In case of conflicts, the rebase could be aborted with git rebase --abort and we could fall back on existing behavior and that's fine. But for the times when the team has simultaneously contributed to different articles, this would give a cleaner history of the whole repo.

Similarly, an automatic git stash, git stash pop around the pull could provide a smoother, more automated experience when syncing comes to a halt during the day because of conflicts. Files with unresolved conflicts should obviously not be pushed but they would become automatically visible in VSCode source control making them easier to react to.

Document that the remote name should be origin

Hi,
the remote name is hard coded to be origin and I just have been bitten by this.
Should I make a PR against the Readme to document it, or would you like me to make it a configuration option?
I'd be happy to contribute.
Best,
Denis

Allow specifying a "verify" command that can gate auto-commits

Currently, if you enable GitDoc, it will automatically create commits on save, without verifying whether the change is "good". In order to support users that would like to automatically perform commits, but ensure those commits are valid, we should explore the ability to define a "verify" command, that would be run before actually committing.

Add the ability to "name" versions

Google/Word documents allow you to name a version, which lets you provide a semantically meaningful name to a change, as opposed to relying on it to have a date-based name. To enable this, we should explore adding a "Name Version" command to the Timeline tree.

Feature Request: filter branches

I'd love a setting that allows me to provide a list of branches for which, when I have them checked out, GitDoc does not perform an autocommit. I don't see this anywhere in the current extension.

The usecase is that I do some Remote SHH-based development. I'm happy to have autocommits to my own local main branch because I have autoPush turned off, but Id rather not have those branches committed to remotely (and in truth would prefer them not to be committed to locally).

This is an itch-scratch, so I may have a stab at it myself - not sure if a PR is likely to be merged.

Pull on delay doesn't work

Hi,

Pull on delay doesn't work for me. My user settings:

    "gitdoc.timeZone": "America/Los_Angeles",

My workspace settings:

 "gitdoc.commitValidationLevel": "none",
  "gitdoc.enabled": true,
  "gitdoc.autoPull": "afterDelay",
  "gitdoc.autoPullDelay": 30000,
  "git.enableSmartCommit": true,
  "git.postCommitCommand": "sync",

Happy to provide more info if helpful.

The reason I need "pull on delay" is that I have a notes repository that I work on mobile + desktop. I keep it open at all times on my laptop so I need it to sync every once in a while.

It appears that it pulls only when it pushes (e.g. on file change)

Hi

There's a way to make the extension filter by repository name like it already do to file patterns?
I don't want it to auto commit in all of my repos, just a few of them

Broken in VSCode version 1.7.0

This extension seemingly stopped working for me after updating to VSCode version 1.7.0. When I toggle the developer tools, I can see the following gitdoc-related error pop up after the configured commit delay:

mainThreadExtensionService.ts:80 TypeError: Cannot read properties of undefined (reading 'add')
	at vscode-file://vscode-app/home/user/.vscode-oss/extensions/vsls-contrib.gitdoc-0.0.8/out/watcher.js:69:46
	at Generator.next (<anonymous>)
	at vscode-file://vscode-app/home/user/.vscode-oss/extensions/vsls-contrib.gitdoc-0.0.8/out/watcher.js:8:71
	at new Promise (<anonymous>)
	at __awaiter (vscode-file://vscode-app/home/user/.vscode-oss/extensions/vsls-contrib.gitdoc-0.0.8/out/watcher.js:4:12)
	at commit (vscode-file://vscode-app/home/user/.vscode-oss/extensions/vsls-contrib.gitdoc-0.0.8/out/watcher.js:42:12)
	at vscode-file://vscode-app/home/user/.vscode-oss/extensions/vsls-contrib.gitdoc-0.0.8/out/watcher.js:93:13
	at Generator.next (<anonymous>)
	at vscode-file://vscode-app/home/user/.vscode-oss/extensions/vsls-contrib.gitdoc-0.0.8/out/watcher.js:8:71
	at new Promise (<anonymous>)
	at __awaiter (vscode-file://vscode-app/home/user/.vscode-oss/extensions/vsls-contrib.gitdoc-0.0.8/out/watcher.js:4:12)
	at vscode-file://vscode-app/home/user/.vscode-oss/extensions/vsls-contrib.gitdoc-0.0.8/out/watcher.js:92:61
	at Timeout.later [as _onTimeout] (vscode-file://vscode-app/home/user/.vscode-oss/extensions/vsls-contrib.gitdoc-0.0.8/node_modules/debounce/index.js:27:23)
	at listOnTimeout (node:internal/timers:557:17)
	at processTimers (node:internal/timers:500:7)

It looks like the _repository-property isn't part of the API anymore. I think the change to the related APIs happened in this commit.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.