Add project to Github

I am developing a binding in Eclipse.
Now I want to put it to GitHub, but every time I push my branch it pushes the whole openhab-addons directly (without my new binding which is located within openhab-addons/bundles). In Eclipse, Team/Push Branch I select my binding, but still it pushes openhab-addons.
I tried several different inputs, but without success. I also read the Simple git guide referenced to in the Developers Overview of openHAB, but it didn’t help me. I am aware that it is difficult to help because there are so many settings, but I don’t know where to further check the settings.

If you push to GitHub it will send the commits that are locally different from the remote on GitHub (simplified explanation) So if your git repo which is everything in the directory containing the .git directory, is missing commits locally with openhab-addons commited from remote it will send those commits. Which would make sense if you started with the openhab-addons repo. You can not send a subdirectory. That’s not how git works. Only commits. Where each commit is a delta of changes in time.

I guess you didn’t commit your binding locally and therefor it is not send to GitHub.

The openHAB git guide is probably not a good starting point if you don’t know anything about git. To understand git maybe read some general introductionairy tutorials. There are numerous online.

Thank you @hilbrand for your explanations. Then I really have to read an introductory tutorial. I just wanted to put my binding to GitHub like others did (eg. ), but probably I will need to understand the whole GitHub system before doing this.

Putting only your binding into an own repository ( like the example you posted) migth be easier for you to do at the moment, however that way it can’t be merged to the whole project and all possible users would need to drop the .jar into the adons folder. Additionally how would the majority of users get to know your binding exists?

This process has worked well for me:

  • fork the OH2 repo
  • clone the fork
  • make changes
  • commit the changes (one or more times)
  • push the commit(s)

Just started recently with programming a binding, I ran into the same problem.
After some reading, the steps above worked for me as well

The difference I see, is that I forked the addons repo and added the files.
Order was for me

  • Fork addons repo
  • Cloned the fork locally (git clone )
  • made changes
  • added my files to the repo (git add )
  • commit (git commit)
  • push the commits (git push)

I think I did forgot something, still learning :slight_smile:
Now waiting till it is mature enought to make a Pull Request.