Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411421 Posts in 69363 Topics- by 58416 Members - Latest Member: timothy feriandy

April 18, 2024, 01:30:59 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Clarification on using git with game programming
Pages: [1]
Print
Author Topic: Clarification on using git with game programming  (Read 915 times)
Andy@TCS
Level 0
**



View Profile
« on: August 15, 2016, 11:59:57 AM »

I'm currently using git and bitbucket while developing my game. I have a lot of files, most of which are fairly small, that I have uploaded to a repo. However, I have some files, such as dll's and artwork that are taking up a massive amount of space. My question is, can I upload only my code to my bitbucket branches and have it still recognize the dll's and artwork? With the text editor I use, atom, if I switch to a branch that does not have a file, atom will not recognize it, so I am led to believe files not pushed to a branch will not be able to be accessed by code in that branch? In other words, can I only upload my code, ignore the dll's and artwork, and still have everything compile and run correctly? If so, is there anything extra that I have to do?
Logged
alvarop
Level 9
****


ignorant


View Profile WWW
« Reply #1 on: August 15, 2016, 12:06:27 PM »

Isn't that what a .gitignore is for?
Logged

i make games that can only ever be played once on http://throwaway.fun
DireLogomachist
Level 4
****



View Profile
« Reply #2 on: August 15, 2016, 06:20:22 PM »

A .gitignore might come in handy for that but it's not very safe file-wise.
And cloning a new repo would require copying over all those files by hand. Not fun.

There is an option with Git LFS (Large File System) that is meant to handle this.

In fact, Bitbucket just added it as a feature. You might want to check it out here: https://blog.bitbucket.org/2016/07/18/git-large-file-storage-now-in-bitbucket-cloud/

Haven't used it myself but images, sound, and video are all what its meant for.
Logged


Living and dying by Hanlon's Razor
InfiniteStateMachine
Level 10
*****



View Profile
« Reply #3 on: August 16, 2016, 04:55:00 AM »

You're saying that if you switch branches you can't see your art? If the art existed on mainline when you branched from mainline then you should be able to see it and it shouldn't take up space until you modify and re-commit the file. If you added the file to mainline after creating the branch you should be able to merge it in without taking up more space if there's no difference in the file. On that note. No SCM is going to make any difference in regards to space savings on the remote/server side because otherwise that would mean you haven't saved all versions of your files.

If aren't interested in version controlling your art or binaries then you could pull from some external non-SCM storage. There's a ton of ways you could do it. LFS, a buildscript which pulls the necessary files from a server into an scm-ignored region of your project, dropbox link etc..

Are you hitting a limit on bitbucket? If you aren't then I would just keep putting the art/dll's in there. No need to over-complicate things unless there's a real need to.
Logged

quantumpotato
Quantum Potato
Level 10
*****



View Profile WWW
« Reply #4 on: August 16, 2016, 05:47:02 AM »

Hi, this may be overkill for what you're trying to achieve, but if you look at git submodules.

You can nest a git reference inside of another project and manage the referenced repository separately.

Sourcecode/
   PlayerModels
   EnemyModels
   GameController
Resources
   Configuration/

where everything is your project. Then you could add an Assets folder under Resources, linking it to my.git.hostingsite:assets.git

And manage the assets project separately - or perhaps by different team members.

What you'll do in your main project is git submodule update as needed to keep your git reference up todate. However, only the *reference* in name, git url and commit hash will be committed to your primary repository.

This is often used when you're using a third-party library that's evolving, or a core game engine across multiple projects. It keeps you from having to duplicate code (or continually paste your Assets in).

Again this may not be an exact solution for what you're looking for but it sounds like you have a clear deliniation between your source code and the Art & DLLs so I recommend looking into it.

https://git-scm.com/book/en/v2/Git-Tools-Submodules
   
Logged

Andy@TCS
Level 0
**



View Profile
« Reply #5 on: August 16, 2016, 12:48:39 PM »

Thanks guys. I ended up using bitbucket LFS
Logged
quantumpotato
Quantum Potato
Level 10
*****



View Profile WWW
« Reply #6 on: August 16, 2016, 03:23:54 PM »

If I was a mod I'd mark this as [SOLVED]
Logged

Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic