2020-03-26

[java] 使用Lombok 在 IntelliJ

需要寫某些Service的SDK,參考相關的開發後,有需要用到 Builder Pattern。
lombok 可以提供builder 的方式,一開始用 IntelliJ 去開發,在Test Code 中怎樣都沒有辦法產生相關的 builder() method. 找了幾個相關的資料,下面這一個是可以解決IDE 的問題.

 https://ask.xiaolee.net/questions/1149362
其中 去安裝 lombok plugin 可以解決我的問題.

2020-01-17

[GIT] Remove Submodule


  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule

# Remove the submodule entry from .git/config
git submodule deinit -f path/to/submodule

# Remove the submodule directory from the superproject's .git/modules directory
rm -rf .git/modules/path/to/submodule

# Remove the entry in .gitmodules and remove the submodule directory located at path/to/submodule
git rm -f path/to/submodule