如何将配置和自定义文件夹从本地系统推送到 hybris 的远程存储库

How to push config and custom folder from local system to Remote Repository for hybris

我正在尝试为 hybris 设置远程存储库,我已经在本地系统中设置了一个网站。 现在我只需要将配置、自定义文件夹推送到远程存储库,我也创建了 .ignoregit 文件,但是在创建存储库后代码没有提交。 它没有显示要提交

这里是一个针对 hybris 的 .gitignore 文件的示例:

https://github.com/sap-commerce-tools/supportportal-example/blob/master/.gitignore

在你的情况下,你必须删除/注释第 14 行,因为如果我理解正确的话,你想将 hybris/config 提交到你的存储库。

另请查看我的 gradle hybris 开发插件。 插件和示例可以在这里找到: https://github.com/sap-commerce-tools

  • 在根文件夹创建存储库,假设 hybris 是您的根文件夹
  • 以这种方式在 hybris 中提取您的 hybris 平台源,这样您的文件夹路径将为 hybris/bin/platform/
  • Replace/Add 您的配置和自定义文件夹
  • 现在配置您的 .gitignore 文件(在根文件夹中找到)以阻止除配置和自定义之外的所有内容
  • 提交更改并推送您的存储库

样本 .gitignore

# Folders to ignore at root(hybris)
hybris/log/


# Allow only custom extension
hybris/bin/*
!hybris/bin/custom/

# Absolute path to ignore
hybris/config/fileDontCommit.txt

#  Skip Addon folders from custom storefront
**/_ui/addons
**/_ui-src/addons
**/views/addons
**/tld/addons
**/tags/addons
**/messages/addons
**/addonsrc

# Skip generated classes from custom
Generated*.java