-1

Can I do the following without having to learn any version control systems?

  • branch a codebase (to install an addon on each branch)
  • merge files (merge--or rather--replace stock files with edited files if provided)
  • merge files from different branches (so I can cherry-pick a combination of working addons)

I'm a user of osCommerce e-commerce CMS. And it has an addon system which are patches for the stock codebase to increase functionality and features.

The addons site hosts packages which generally contain modified files to replace the stock files and instructions if the files in question have already been modified. I've found it difficult to keep track of changes I've been doing. And I couldn't just revert back to what it was before trying to install a new addon and edit a bunch of files.

I considered using version systems like Git or something but other than editing by following instructions, I don't do a single line of coding myself. I signed up for GitHub thinking that I could just graphically take care of versioning, merging, etc. on their website, but the web frontend lacked those abilities or they weren't obviously visible.

I already tried GitHub for Windows. I could ask it to clone the osCommerce repo (they develop on GitHub), and browsing to the repo it shows the last commit and diff. For the life of me I couldn't find anyway to do the bullet points I mentioned above.

4

2 回答 2

3

GitHub 确实具有这些功能。

下载适用于 Windows(或Mac)的 GitHub,并使用图形界面来满足您的需求。我没有为 Git 使用任何 GUI(因为它更容易运行git commit -a然后打开一个窗口并单击按钮)但是 Mac 和 Windows 的 GitHub 界面看起来很时尚。

为了通过 GitHub 合并代码,您需要首先创建将要修改的原始代码的一个分支。这称为叉子。完成更改并希望将它们合并回主代码后,将 Pull Request 发送回原始存储库,GitHub 将为您合并它们。

我不完全确定 UI 是如何处理这个问题的,但它们应该很好。

于 2012-06-09T19:34:38.963 回答
2

你可以试试SmartGit。您仍然需要掌握 git 基础知识,但该界面与 VCS 一样具有可视化和用户友好性。

ProGit 这本书非常适合 git 初学者。

编辑:要使用 SmartGit 进行分支,您可以使用F7快捷方式,或转到branch菜单(在最顶部的选项列表中间)。选择new branch,在弹出的对话框中,输入您的分支的名称并选择Add Branch and Switch。瞧,您已经分支了代码库,您所做的更改可以提交到新分支。

您可能不想(再次)听到它,但为了避免您感到沮丧,我也建议您阅读一些 git 基础知识。GitPro 书的前 60 页就足够了。也许更少。

尽管 VCS 不仅仅用于代码,但所有当前的系统都是由程序员为程序员设计的。如果对内部工作原理没有一些基本了解,您有时会得到意想不到的结果。您将不得不从中恢复的结果。

于 2012-06-09T19:33:42.493 回答