跳转到内容
View in the app

A better way to browse. Learn more.

彼岸论坛

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
欢迎抵达彼岸 彼岸花开 此处谁在 -彼岸论坛

[git] Syncthing 同步 git 仓库下的文件有问题,求大佬指教

发表于

如果 Syncthing 同步的文件同时也在 git 仓库下时,会出现这种问题,设备 A 通过 git 上传到 GitHub ,并通过 syncthing 同步到设备 B 。但设备 B 也有相同的 git 仓库,就会出现下面的问题。

krdw@thinkpad:~/blog$ git status
On branch main
Your branch is behind 'origin/main' by 5 commits, and can be fast-forwarded.
  (use "git pull" to update your local branch)

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   src/content/blog/build-your-rss-flow.md

Untracked files:
  (use "git add <file>..." to include in what will be committed)
	src/content/blog/building-homeserver-with-laptop-v2.md
	src/content/blog/file-sync-syncthing-tailscale.md

no changes added to commit (use "git add" and/or "git commit -a")

此时 build-your-rss-flow 的修改和 file-sync-syncthing-tailscale 的新增都已经被设备 A 提交修改到 GitHub 上,building-homeserver-with-laptop-v2 的新增两台设备都没有进行提交。

请教一下各位大佬,在设备 B 我该如何操作呢?以保证和设备 A 相同,git 仓库同步为最新,且未提交更改的文件继续保留,因为设备 B 一删设备 A 也同步会被删。

Featured Replies

没有可显示的帖子

创建帐户或登录来提出意见

Account

导航

搜索

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.