Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Interaction between Roll20 & Github.

While my battle with Github is climbing to herculean levels, I have a few unrelated questions on the way Github interacts with roll20. I use GitHub for Windows for my committing, syncing, pushing, pulling needs (pretty sure it only does half of that). I noticed that there are sheets online that are not in my repository (the folder on my computer). Why is that and can I bring them down to my computer? When I am making edits, I use the custom character sheet option on the campaign settings. This leads me to copy and paste the whole code over to the html and css files. The GitHub for Windows seems to read this as a complete file change (1,000+ deletions and additions). Is this an issue and, if so, how should I be doing it? I discovered I can go on github and make the changes directly, and hit the pull request button. This appears simpler, and keeps keeps the pull request limited to the exact sheet I worked on. Is this a better or worse way to do make the changes?
1422634341
Lithl
Pro
Sheet Author
API Scripter
John W. said: I use GitHub for Windows for my committing, syncing, pushing, pulling needs (pretty sure it only does half of that). I noticed that there are sheets online that are not in my repository (the folder on my computer). Why is that and can I bring them down to my computer? Most likely, they are sheets which were added to the repo after you created your fork. I don't think there's a simple way to get them through the GitHub for Windows interface (or the GitHub web interface), however you're not without options. Click the gear icon in the top-right corner of GitHub for Windows and select "Open in Git Shell". You'll see a command line window with a prompt something like "C:\roll20-character-sheets [master]>" In order to get those other sheets into your local version, type: git fetch upstream git merge upstream/master You can then either type git push origin master , or else you can click the Sync button in the GitHub for Windows interface. This will get those sheets into your GitHub fork. (If you've figured out how to make alternate branches and you're using one, you'd want something like git push origin my-branch-name ) However, it's worth mentioning that not having those sheets in your local copy or your fork shouldn't be an issue. You only need to do this if you want to have those sheets for yourself. John W. said: When I am making edits, I use the custom character sheet option on the campaign settings. This leads me to copy and paste the whole code over to the html and css files. The GitHub for Windows seems to read this as a complete file change (1,000+ deletions and additions). Is this an issue and, if so, how should I be doing it? This depends on exactly what changes you're making to the sheet. Git tries to figure out line-by-line (and in some cases word-by-word) what changes you've made to the file. It does a pretty good job, but it's not perfect. You shouldn't worry about how many changes are considered to be made by Git; it doesn't make a functional difference, and makes very little technical difference. John W. said: I discovered I can go on github and make the changes directly, and hit the pull request button. This appears simpler, and keeps keeps the pull request limited to the exact sheet I worked on. Is this a better or worse way to do make the changes? The pull request will always include all commits you've made to the branch which are not already in the official repo. It doesn't really mater if you make those commits from the web interface or from your computer. Note that it also means that commits made to the same branch after you make your pull request (and before the pull request is merged) will be included in the pull. If you make edits from GitHub's web interface, each file is going to be a separate commit, rather than each commit being a separate "thought", as is the intent. However, if you find the web interface easier to use, then by all means use it. Personally, I would rather see commits split up into separate files than see fewer people contributing to the repo!
Thank you very much. That pretty much completely answers my questions. Wait, one more: I have changes in my repository, and I'm waiting until my current batch of pull requests are approved or denied before I send them up. If I 'fetch upstream', won't my changes be erased? It sounds like they would be.
1422663337

Edited 1422663455
Lithl
Pro
Sheet Author
API Scripter
"upstream" is just a name that's referring to the official Roll20 repo (GitHub for Windows automatically creates this relationship, as it's a common convention in Git; "origin" similarly is a name referring to your fork of the repo). The "fetch" command just updates your references, it doesn't actually change any of the files that are being tracked. "upstream/master", then, is referring to the "master" branch of the Roll20 repo (the only branch on that repo). The "merge" command merges changes between the specified branch (upstream/master) and your currently checked out branch (by default, your local master branch). None of your changes will be overwritten (in order to do that, you'd have to use git reset --hard upstream/master , which would overwrite your changes). There's a possibility that there are conflicting changes in the files you've changed, but that's unlikely, and Git will not overwrite your files in that case with the default merge command; you'd have to perform a manual merge which can get complicated. I'll reiterate that a merge conflict is unlikely, though.