I’ve discovered that no one has yet write a way to use git locally to develop custom_components inside devcontainer so that you don’t have to copy-paste.
Instruction
- First, clone repository inside
/config/
foldercd /config/ git clone <github repository>
- Second, copy
.git/
folder in/config/
foldercp -r <github repository>/.git/ .git/
- Than you need to create
.gitignore
file and write it inside* !.gitignore !custom_components/ # will not ignore all this folder custom_components/* # will ignore all folder in this folder !custom_components/<name of component> # will NOT ignore you component folder !custom_components/<name of component>/** # will NOT ignore all inside your component folder
- After that you need to check in console that in terminal you use
local
git data. You can use this commands to handle git in terminalgit add . # add file(s)/folders to git handling git commit -m "Your comment" git push git pull