用于单独项目的 GIT GUI:用于开发的 Windows PC,但 git + LAN 无头 Linux 服务器上活跃的、工作的项目存储库?
我刚刚为一个独立项目第一次安装了 git —— 现在我不知道我是如何在没有版本控制的情况下生活这么久的。我想看看 GUI 是否会有帮助,但我有一个问题...
- 我的开发机器正在运行 Windows
- 该项目位于 LAN 上的无头 Linux 服务器上
- 项目目录通过 samba 共享并映射为网络驱动器windows pc
- 我是唯一使用此服务器的人,因此无需将存储库克隆到 windows pc
- 如果我通过 SSH 使用 git,这根本不是问题 到目前为止
我尝试过的 GUI git 客户端都假设我正在运行 git不过,我安装它们的机器。如果我尝试使用 widnows 安装的 git 在 linux 托管的存储库上进行操作,它会(不出意料地)像糖蜜一样慢,并且似乎存在兼容性问题。
有什么办法可以让 smartgit 工作起来吗?或者还有其他靠谱的客户吗?
我确实安装了 gitweb,它看起来足够好,可以查看项目历史记录,但我实际上无法用它“做”任何事情。
编辑:如果我可以扩大这个问题,只是询问有关如何继续的建议,即:忍住并使用 Putty 和其他东西进行可视化,克隆存储库并推/拉,或者做一些不同的事情,比如 svick 的 X Server 建议。
I just installed git for the first time for a solo project -- and now I don't know how I lived without version control for so long. I wanted to see if maybe a GUI would be helpful, but I have a problem...
- My development machine is running windows
- The project is on a headless linux server on the LAN
- Project directories are shared through samba and mapped as network drives on the windows pc
- I am the only one using this server, so there's no need to clone the repo to the windows pc
- If I use git through SSH none of this is a problem at all
The GUI git clients I've tried so far all assume I'm running git on the machine I install them on, though. If I try to operate on the linux-hosted repo with widnows-installed git, it's (not unexpectedly) slow as molasses and seems to have compatibility issues.
Is there any way to make this work for smartgit? Or any other decent client?
I did install gitweb, which seems nice enough to look through project history, but I can't actually 'do' anything with it.
EDIT: If I could maybe broaden this question and just ask for a word of advice on how to proceed, ie: suck it up and use Putty with something else for visualization, clone the repo and push/pull, or do something different like svick's X Server suggestion.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
好吧,为了清晰而不是虚荣,我将把我自己的答案标记为正确,希望能帮助陷入类似困境的人。我希望没有人会被冒犯。
顺便说一句,在提出一个可行的解决方案之后,我仍然最终使用 SSH 和驱动器映射的共享 Linux 目录进行开发,但在 Windows 计算机上有一个本地位置来放置一个可用的存储库是很有用的。无论如何,GIT 对我来说就像窗户上的糖蜜一样慢,所以我会尽可能少地使用它——但这只是我的情况。
如果你的 bash-foo 像我的一样弱,webmin 可以帮助解决以下问题。所以这就是我最终要做的:
摘要:
目的:
解决方案的优点:
解决方案缺点:
先决条件:
要做什么:< /strong>
为了进一步复杂化可能几乎不需要任何解释的内容,这里有一个(简化的)图表:
Okay, I'll be marking my own answer correct for clarity and not vanity, to hopefully help someone caught in a similar predicament. I hope no one will be offended.
As, a side note, after coming up with a working solution, I still ended up using SSH and a drive-mapped shared linux directory for development, but it's useful to have a local place on the windows machine to put a working repo. GIT is just slow as molasses on windows for me no matter what, so I'll be using it that way as little as possible -- but that's just me.
If your bash-foo is weak like mine, webmin can help with the below. So here's what I ended up doing:
Summary:
Purpose:
Solution upside:
Solution downside:
Prerequisites:
What to do:
To further complicate what probably hardly needed any explanation here is a (simplified) diagram:
。实际上,似乎有一些需要。如果您希望存储库像本地存储库一样快,最简单的选择是实际创建本地存储库。
另一种选择是在 Windows 计算机上安装 X Server,并使用通过 SSH 的 X 隧道在 Linux 服务器上运行 git GUI,但在 Windows 上显示它。
Actually, it seems there is some need. If you want the repository to be as fast as if it was a local repo, the easiest option is to actually create a local repo.
Another option would be to install X Server on the Windows machine and use X tunneling over SSH to run the git GUI on the Linux server, but display it on Windows.
DVCS 的优点在于您可以在本地计算机上获得存储库的完整本地副本。就 git 而言,几乎假设您将在本地克隆或(至少)存储存储库。
现在,您已经声明克隆它并不理想,但事实是为了使 GUI 有效,它需要在本地存储库所在的位置运行。
根据您的工作流程/设置,这可能可行,也可能不可行。我的建议是:
git push
到远程存储库,然后部署。现在,如果您有资源,有一些更好的方法可以真正解决这个问题,我已在 其他帖子。再说一遍,如果您有足够的灵活性来做这样的事情,我强烈推荐它。如果这太激进,你可能必须坚持你正在做的事情。希望这有帮助。
PS:我也是一名独立开发人员,我在版本控制设置上投入了大量时间。它得到了回报!
The beauty of DVCS is that you're getting an entire, local copy of the repo on your local machine. In the case of git, it's almost assumed that you're going to be cloning or (at the minimum) housing the repository locally.
Now, you've stated that it isn't ideal for you to clone it over, but the fact is that in order for the GUI to be effective, it's going to need to be running where the repo is locally.
Depending on your workflow/setup, this may or may not be feasible. Here's my suggestion:
git push
to the remote repo, and ta-da, deployed.Now, there's a few better ways to really get into this if you have the resources, and I've detailed them in other posts. Again, if you have the flexibility to do something like this, I highly recommend it. If that's too radical, you might have to stay the course with what you're doing. Hope this helps.
PS: I'm a solo developer as well, and I put a LOT of time into my version control setup. It has paid off!
我有一个类似的配置,并在目标 Linux 机器上运行克隆。不过,我也在 Windows 中使用 ssh 在无头 Linux 机器上进行开发。我在 Win7/64 上运行 Xming。因此,对于此活动,Windows 盒子几乎只是一个 X 终端。
我在 Linux 机器上安装了 gnome-terminal,因为我对 putty 或在 Windows 命令窗口中运行的 xmingw bash 都不满意。
它并不完美,但已被证明是可行的。
I have a comparable configuration and I run a clone on the target Linux box. However I also develop on the headless Linux box using ssh from Windows. I'm running Xming on Win7/64. So for this activity the Windows box is pretty much just an X-terminal.
I have installed gnome-terminal on the Linux box, because I'm not happy with either putty or the xmingw bash that runs in a Windows command window.
It ain't perfect, but it's proven to be workable.