TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Autosaved: A Go utility for autosaving progress in Git projects

44 点作者 nikochiko超过 3 年前

4 条评论

rjmill超过 3 年前
I&#x27;ve been in the market for a tool like this. If this or dura used inotify events instead of polling, I&#x27;d use it in a heartbeat.<p>[long story about a weird real-world use case for this kind of tool]<p>For &quot;reasons&quot; I work in a cloud-based container that has persistent storage mounted via NFS. That&#x27;s where we&#x27;re supposed to keep our git repos, since that&#x27;s the only place where we get persistence. The codebase is huge though, and &quot;git status&quot; takes upwards of 10 seconds on the NFS.<p>I started keeping my .git directory in the NFS and having the actual files on the &quot;local&quot; container filesystem. That makes git fast again. But it means I lose any untracked changes when my container dies.<p>I&#x27;m currently using an insane solution that I want to get rid. I&#x27;m using lsyncd to rsync my files back to the NFS as I work. But recovery is still slow as death, so I pointed lsyncd to an &quot;rsync&quot; script that runs rsync and then does a git diff (with hacky nonsense to include untracked files in the diff.) When I lose my container, I can then apply that diff after rebuilding the repo files. It&#x27;s insane but it works really well.<p>At any rate, this is a cool project. I wish I could go back in time and tell myself to use this instead of rolling my own ungodly hackfest of a solution.
评论 #29919098 未加载
Narretz超过 3 年前
I swear a similar tool was discussed here a just a few days ago, but I can&#x27;t find it.
评论 #29913979 未加载
gouggoug超过 3 年前
I have nothing against this tool in particular;<p>I am however quite worried that this kind of tool will just enable this already terrible habit that a lot of developers have; which is to mindlessly commit changes and then make PRs full of &quot;asdf&quot;, &quot;typo&quot;, &quot;fixing comma&quot;, &quot;blaaaaa&quot;.<p>With this tool, these developers won&#x27;t even have to waste time typing `git commit` and will happily submit PRs as a bunch of &quot;autosaved&quot; commits.<p>This further reduces git to being just a means to an end: the end being able to just mindlessly push code over a fence and see it magically deployed.
评论 #29914024 未加载
评论 #29914435 未加载
评论 #29914145 未加载
cerved超过 3 年前
how does this compare to using stash?
评论 #29920181 未加载