Unfortunately I haven’t been active developing my binding (nanoleaf) for quite some weeks but I would like to pick this up again and I do not want to break anything. Although I have been working with git for quite some time I still struggle with managing remote branches and the like (I am honest). As I don’t want to break anything and don’t want anyone to waste valuable time in fixing something that I did wrong, I’d rather ask a few questions and I would be very happy if someone could guide me.
- The last development I did was on 2.5.x and I intend to maintain my binding for OH3 but I guess we still support OH2, don’t we?
-The remote origin is https://github.com/raepple/openhab2-addons.git
What I have done so far:
- I locally switched to 2.5.x, fetched and pulled the git repo. Then I did a git reset --hard origin/2.5.x
- I locally switched to master, fetched and pulled the git repo. Then I did a git reset --hard origin/master
- Both branches tell me that I am uptodate now (but I don’t understand how this is related to the main repo or only my fork?)
So here are my questions as I hope someone can guide me a bit:
- As shown above I have a fork on “https://github.com/raepple/openhab2-addons.git” which says “This branch is 4294 commits ahead, 656 commits behind openhab:main”.
- Do I have to sync this first with the main repo and if how would I do that?
- Or should I proceed differently?
- In general what is the best approach for me to continue the development without breaking something and in particular not screwing up the git history when later pushing something which would drive the community mad?
- which are the branches I should work on to support OH2 / OH3? Do I have to maintain them separately?
Maybe this has been answered somewhere else but I couldn’t find anything so far.
thanks in advance