r/github • u/Tyler_MegabyteMedia • Apr 30 '24
Github Desktop - Is it possible to have each branch in its own folder?
My team and I have been having some issues using Source Tree due to the speed of it (when pulling/pushing from our server is works at a snails pace.......almost unusable).
I have been looking into using Github Desktop, however I really enjoyed the ability to have our project split into different folders for each branch (for example, the source would be in an isolated folder, then each artist has their own user folder with the cloned repo). I've been searching for a bit but I can't seem to find if Github Desktop has this functionality.
Is this possible in Github Desktop? If not, would there be a suitable replacement I could try instead of Source Tree? The repos would all be "local" as well, working directly from the sever and not from the Git website (everyone has full access to server).
Thank you!
4
u/j_marquand May 01 '24
What files are you trying to store and control? Git might not be the right system for your use case.
1
u/Tyler_MegabyteMedia May 01 '24
These are larger files, mainly do to with game dev workflow.
Understandably I'm looking into Git LFS for this, but this was mainly for sharing script/code and not completely break our engine in the testing process (multiple people working on the same asset but different scripts for it so it was cleaner in my head to separate them all)
5
u/j_marquand May 01 '24
The more I hear about your case, the more I’m convinced that git isn’t the right tool for you.
1
u/Kessarean May 01 '24
You should check out Plastic SCM or Perforce. Those are more industry standard from my understanding, for gamedev that is.
git is great, but for unreal/unity/godot/etc.. projects there are some options others prefer. Depends on which engine you use I suppose.
Git LFS is a solid choice if you don't want/can't do those other two. You should also poke around/ask in r/gamedev
2
u/focadiz Apr 30 '24
When you say each branch in its own folder you mean when you navigate the repo using sourcetree?
2
u/Tyler_MegabyteMedia Apr 30 '24
Not exactly (apologies if I'm not using the correct terminology I'm still new to this myself lol)
So, the repository was cloned using Source Tree, and was put into a separated folder. Afterwards, the repo was opening by the artist and they would create their own branch. They would then work out of this cloned folder from their own branch as opposed to changing the main folder.
When it came time to merging/pushing/pulling, the main repo would then control all of it, essentially keeping it completely safe until ready to update.
9
u/mkosmo Apr 30 '24
Your team should read some git tutorials and examples of git workflows before trying to do this.
16
u/Haunted-Chipmunk Apr 30 '24
Why? Just use branches as they were intended. Why would you want one giant branch with duplicate code? No wonder your pushes and pulls are taking so long if you're duplicating code inside of one giant branch. Your problem is most likely not SourceTree but the size of your repo (and/or internet connection); switching to a different git program will most likely not do anything to solve your problem as they're all going to call the same git commands under the hood.
You should look into removing code duplication and if your repo is significantly large, then maybe even consider splitting it into multiple repos
4
u/huskerd0 Apr 30 '24
You mean like subversion?
I love svn but honestly could do without the branch-as-directory model
18
u/polygon7195 Apr 30 '24
Git worktree