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

[HELP] GitHub Clone Question

1523788060
Finderski
Pro
Sheet Author
Compendium Curator
I work on the Savage Worlds Tabbed sheet, and that's about the only game I play...I have created the occasional other character sheet, but the vastness of the roll20 repo doesn't interest me.  However, for me to work on my sheet, I need to fork the entire character sheet repo and then clone it to my computer.  That's a HUUUUGE waste of hard drive space. Is there a way for the clone to only include folders I'm actually working in/on?
1523795503
GiGs
Pro
Sheet Author
API Scripter
The roll20 repository is under 1GB, which used to be a lot, but with most hard drives these days, that's fairly negligible. That said, if you want to avoid downloading it all, I am pretty sure you can work on just the files you want on your own computer, then upload them to your fork of the repository on the web, and then commit from there. You dont get to use the github desktop tool, so have to do things more manually which is a bit clunky, but you can definitely do it that way.
1523813981

Edited 1523814022
Pat S.
Forum Champion
Sheet Author
It is how I work on my sheet. Do the files individually on my computer, upload to my fork then commit it. I don't use the github tool. I also prior to any uploads usually delete my fork and create a new one as I have not figured out yet to make my fork update itself to the latest.
1523815505
Natha
KS Backer
Sheet Author
API Scripter
Pat S. said: It is how I work on my sheet. Do the files individually on my computer, upload to my fork then commit it. I don't use the github tool. I also prior to any uploads usually delete my fork and create a new one as I have not figured out yet to make my fork update itself to the latest. Command lines in your fork: git fetch Roll20 git merge Roll20/master and then push to your repo. your fork will be up to date.
1523816114
GiGs
Pro
Sheet Author
API Scripter
I think there's some missing info there, Natha. Assuming people have plain text files on their pc, plan to upload them manually to their github website, what would they enter those command lines into?
1523826030

Edited 1523826055
Natha
KS Backer
Sheet Author
API Scripter
Sorry, you're right GG. If you've forked the official Roll20 sheet repo, and downloaded it on your PC with the github application (or direct git commands) some time ago, and want to put your own modifcations in it on a specific sheet, and then make pull request, you'll have to update your fork first, to catch up with the current state of the official repo, to push only what's different (=your modifications). So before putting your modified files locally in your fork, update it with the commands above, push to your repo on github (so your fork is up to date locally and on github) and then put your modified files and make a PR. This avoids to have to delete and refork, and/or to push unwanted modifcations from other/older sheets (and have merge conflicts like I see sometimes happening). There's perhaps a better way, but that's I've been using for years.
1523827232

Edited 1523864911
Jakob
Sheet Author
API Scripter
I always create a new branch from Roll20/master directly, not from my own master. That makes more sense anyway if I'm making changes for more than one sheet at the same time, and everything ends up neatly in its own branch. 
1523849808
Finderski
Pro
Sheet Author
Compendium Curator
G G said: The roll20 repository is under 1GB, which used to be a lot, but with most hard drives these days, that's fairly negligible. It's negligible, but it's also a bunch of clutter on my HDD. :) Anyway, thanks everyone, pretty much what I figured...
1523863904
GiGs
Pro
Sheet Author
API Scripter
Jakob said: I always create a new branch from Roll20/master directly, not from my own master. That makes more sense anyway if I'm making changes for more than one sheet at the same time, and everything end up nearly in its own branch.  How do you do that?
1523864711

Edited 1523864919
Jakob
Sheet Author
API Scripter
G G said: Jakob said: I always create a new branch from Roll20/master directly, not from my own master. That makes more sense anyway if I'm making changes for more than one sheet at the same time, and everything ends up neatly in its own branch.  How do you do that? Desktop client or command line?
1523865860
GiGs
Pro
Sheet Author
API Scripter
Desktop client preferably, but I'm willing to learn either.
1523866228
Jakob
Sheet Author
API Scripter
Okay, switch your branch to Roll20/master: It will tell you that you have to copy the branch to your fork to make changes, so pick a name and click "Copy Branch". And you're done, you have a new branch which tracks the remote branch Roll20/master, and you can make commits / pull requests from there.
1523867029
GiGs
Pro
Sheet Author
API Scripter
Thanks, I'll try that out this evening. Once you have a couple of branches, how do you switch between them, and make sure any changes you are making go to the branch you want?
1523867325
Jakob
Sheet Author
API Scripter
You can switch branches via the menu in my first screenshot. And if you're making changes to files, just switch to the correct branch before making those changes. If you switch branches, Git will also update all files in your local folders — so if you've changed file1 in branch A and then switch to branch B where you have never changed file1, it will appear untouched (so in this case, the same as the Roll20/master version at the time you created the branch).
1523868089
GiGs
Pro
Sheet Author
API Scripter
That sounds perfect. Thanks.
1523894075

Edited 1523894098
Natha
KS Backer
Sheet Author
API Scripter
Jakob said: Okay, switch your branch to Roll20/master: (...)  As I'm far (far) from the github expert, so maybe a stupid question: if every sheet authors create their own branch, will they be visible for everyone and won't it be "bloated" when listing the branches from the Github desktop app?
1523897440
Jakob
Sheet Author
API Scripter
Not an expert either, but I think branches you create on your own fork should only be visible to you.
1523899084
Andreas J.
Forum Champion
Sheet Author
Translator
Jakob said: Not an expert either, but I think branches you create on your own fork should only be visible to you. If you push you work to GitHub, everyone can see all your branches and work, but they have to go to your fork to see it. I think their buisness model was that people could pay if users want some of their stuff private. Natha said: As I'm far (far) from the github expert, so maybe a stupid question: if every sheet authors create their own branch, will they be visible for everyone and won't it be "bloated" when listing the branches from the Github desktop app? Nope, branches are visible only in the fork they are created in. That's one of the main reason why forking exists.
1523899958

Edited 1523899997
Natha
KS Backer
Sheet Author
API Scripter
Ok, thanks Andreas and Jakob. I'll try branching from my fork instead of updating to be on par with the main repo.
1523958659
Jakob
Sheet Author
API Scripter
Thanks for the clarification Andreas, what you said there was what I actually  meant to say :).
1523959697
Andreas J.
Forum Champion
Sheet Author
Translator
Jakob said: Thanks for the clarification Andreas, what you said there was what I actually  meant to say :). It feels nice that all the things I've learned from you and others, regarding making char sheets and GitHub, is on the level where I can help others.(Even if the clarifying comment wasn't that great)
1523964747

Edited 1523964789
Natha
KS Backer
Sheet Author
API Scripter
Nonetheless, for people like me with small/slow internet connections, I do recommand fetch/merge command lines to get a fresh, up to date fork of the main repo, if needed. Far less to download than reforking.
1523964811
GiGs
Pro
Sheet Author
API Scripter
Jakob said: Okay, switch your branch to Roll20/master: I've tried to do this, but i dont have the option of picking roll20/master. I also added that pendragon-sheet branch before I realised I was still in my own folk and not the roll20 one, and dont see any way to delete it.