Text of community.smartthings.com › t › github-commit-question › 119656 as Styx crawled it on Nov 20, 2026. The page may have changed since. Only its words are kept, without pictures or layout, and only the first part of a long page.

Open the live page

GitHub Commit Question - General Discussion - SmartThings Community

GitHub Commit Question General Discussion developers , github Nezmo February 21, 2018, 3:02pm 1 Searched up and down but can’t find my answer. I’ve done a bunch of coding in my IDE but up to now I’ve never committed anything. I am now trying to commit but have some questions. I have GitHub integration on and have set up my fork, etc. When I come to commit my code I can’t figure out how to send to the right repository as so many use the same name (thanks to the ST doc for that).

Here’s my point. I have the following set up in integration: Screen Shot 2018-02-21 at 8.55.02 AM.png 1172×1910 261 KB When I hit Commit I get the following list: Screen Shot 2018-02-21 at 8.55.16 AM.png 488×1014 80.9 KB I thought perhaps things were in the same order as the settings list (as they are when you ‘update from repo’) but it seems not as I tried a commit yesterday and I’m pretty sure it went to the wrong place!

How on earth do I commit to my repository? I am sure my post shows I’m a novice here. Creating a Github from scratch AND uploading code I have in a file Nezmo February 21, 2018, 10:20pm 2 No one? I know we have a ton of developers in here. What am I doing wrong or what is it I’m not getting? Appreciate any pointers anyone has please. Thanks rajk (Raj Karamchedu) February 21, 2018, 10:46pm 3 @Nezmo Hey, sorry you didn’t get response sooner.

You probably have looked at this doc? https://github.com/SmartThingsCommunity/Documentation/blob/master/README.md Before even getting to the “git commit…” did you do “git checkout -b origin/master”? Git commits are local. In other words, your commits go into your local branch that you created with the above command, with the name (whatever your branch name is). Does the above comment help? Nezmo February 21, 2018, 11:21pm 4 I have followed some ST doc but I had not seen the doc you just linked to.

I’ll take a look. At first glance it would seem I have missed a step. I’ll post back if I more issues, thanks. Philippe_Portes (PPO16) February 22, 2018, 3:14am 5 Personally, I don’t fork the SmartThings GitHub to add my stuff, I use my own GitHub and provide my repository and branches identifiers to the ST community. Nezmo February 22, 2018, 3:39am 6 At this point, all I want to do is put code I have in my IDE in to GitHub so I can share that with everyone.

Is it really as crude as copying and pasting from your IDE to a file then uploading that file manually to your own GitHub? I know it has to be easier than I’m making this. I just can’t find clear information on what the steps are. Right now I have a modified handler in my IDE that I’d like to share. I can’t simply paste the code in to a post as it’s too big. How do I share this using GitHub? Philippe_Portes (PPO16) February 22, 2018, 5:05am 7 You just have to: create a repository on your github and if needed define a branch name.

In your ST IDE settings, setup you github name, repository and branch Then in ST IDE, edit your file, edit the dth property to .it with the repository. Go back to the devicehandler page and click commit button, choose your repository and validate click on the files from the IDE you want to push if everything is done, the dth line will turn black Nezmo February 22, 2018, 5:19am 8 Okay, I believe I have done all of this but the one part I’m having trouble with is in bold.

I actually managed to do this previously but I ended up sending it to the wrong repository as I can’t tell from the list given which is mine. That was what I was trying to show in my first post - how do I know which is mine in the list of repositories shown after hitting ‘commit’ when several have the same name. Thanks for your patience. Philippe_Portes (PPO16) February 22, 2018, 6:00am 9 Here you go: App Setting (for a smartapp): you set your repository For a deviceHandler: same but in Device Handler Settings: Then: commit 8ed78c7b633b11a7b36752706335703ef6254fbf.png 1905×415 37.3 KB 6296f98e46dc361dd91eefef56a498daeaa7f46e.png 1920×1020 190 KB If anything is changed in your IDE versus your GitHub repo, you will see the file listed there: notch it, add a commit comment and done image.png 1895×723 20.9 KB Nezmo February 22, 2018, 6:09am 10 Okay, so here’s where I have my repository set in my device handler: Screen Shot 2018-02-22 at 12.04.03 AM.png 1634×616 22.3 KB And when I hit commit I get this list which is all the repositories I’m connected to as well as mine.

As happens, there are many with the same name. My issue is how do I know which one to choose? It’s this step I am trying to figure out. I tried the first in the list that matched my name and it got committed to someone else’s repo. Screen Shot 2018-02-22 at 12.04.15 AM.png 548×1058 96.7 KB Philippe_Portes (PPO16) February 22, 2018, 6:11am 11 That’s why I was suggesting you to use your own repository so you don’t have ambiguity.

Now one thing I am surprised is that you would work on the Master branch of SmartThingsPublic. I would expect you are on your own branch. Maybe I am missing something here but if several owners touched the same code, by having so many ST(Master) references, you will end-up in a mess when you refresh your code: how to know which one you have to use. Nezmo February 22, 2018, 6:18am 12 And that’s probably where I am going wrong.

Maybe I have a disconnect in my understanding. I have this set-up in GitHub: And in the ST IDE I enabled GitHub and set-up the following: 29%20AM 1084×600 44.5 KB I just create new handers in the IDE. I assumed those sat on my fork? Obviously I don’t understand things fully. It seems many people have used the same master names as that was implied in some ST doc. Philippe_Portes (PPO16) February 22, 2018, 6:25am 13 yes the commit should push the code at your master of your forked setup.

But imagine you touched module Switch and another guy you import in your IDE also modified it, whcih one you take? I would personally import in my forked setup all thr contributions I want to use. That might require maintenance effort ro report others updates but that wpuld be the clearest to me. Not sure I am being helpful now… shadowjig (John) February 22, 2018, 11:04am 14 So basically you’ve figured out that ST’s implementation of the “Update from repo” list is terrible.

None of us can change it. What Philippe is trying to convey is that you can influence how your github entry shows up by doing one, two, or both of the following: Change your github repository name to something other than SmartThingsPublic to something that’s unique Change your branch to something that’s unique Once you change either or both you’ll need to update your entry in the repository list. Then your repository will be easily visible (depending on the uniqueness of the names you changed them to)… Also complain to ST that the feature is difficult to use in it’s current state.

Honestly this should be easily fixable for them by just including the repository owner’s name in the list when clicking “Update from repo”. Nezmo February 22, 2018, 3:34pm 15 I had come to this realization after all the help. No kidding. Thank you both. UPDATE: I renamed by repo and it looks like I’m in business. Thanks again @Philippe_Portes and @shadowjig . borristhecat (Borristhecat) February 22, 2018, 11:34pm 16 I don’t know how @ady624 does it but everything he puts out, has its own name and makes it a piece of cake to update from repo.

Wish they were all like that, then I wouldn’t have to try 5 different ones before I find the correct one. joelw135 (Joel W) March 7, 2018, 2:42pm 17 I have become so pissed at the way update from repo shows, that I have resorted to printing out a screen shot and numbering them. Still have to open update and count down to the one I want. Would be nice if the format was numbered. shadowjig (John) March 7, 2018, 10:59pm 18 My experience has been that the settings and update screens are not in the same ord

The rest of this page is on the live site.