Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialGabbie Metheny
33,778 PointsBest practice: GitHub repo for client website?
I'm finally using git to track my changes on my first freelancing gig, and after taking the GitHub basics course, I can see how useful it would be to add "Issues" for problems I want to fix in my layout, new features I want to build, etc.-- not to mention just having my work backed up somewhere. I know I could set up a private repo with a paid account, but I'm building this website for free (for a good friend's brother), and I've been trying to keep all my expenses low until I start pulling in an income.
Is it crazy to set up a public repo for my client's site, at least while I'm building it? The code will be visible, anyways, once the site goes live. Is there a good license I could set up to make it clear that the code belongs to me, and the content belongs to the client?
I'd really appreciate any input!
1 Answer
adefee
4,705 PointsGrats on getting into versioning and tracking! GitHub is awesome and one of the pillars of the Open Source community.
Want to answer your question from two different perspectives:
1) On making your clients' source code public:
Be very careful with this. At the very least you should have your clients' permission before doing so, and make sure they (and you) understand the implications. Exposing your code, especially backend code (where applicable) has various security implications. There's also the possibility that pushing unfinished code to the public can give your clients' competitors an advantage (may not matter for a simple site like a blog, but could matter if your client had some type of special process or algorithm or other intellectual property).
I would generally advise against putting clients' code in a public repository unless it's specifically meant to be open-source, used by others, etc.
2) GitHub Private Repos
Yes, GitHub does charge your for private repos.There are other services, however, that do the inverse. BitBucket, for example, charges you based on team size and for public repos (last time I checked). If you're the only one committing code to the private repository, BitBucket would probably be free for you. There's also CodeCommit, by Amazon (AWS); I think Microsoft probably has their own equivalent in Azure. If it matters/is relevant to you, I use CodeCommit and GitHub most often (tend to prefer CodeCommit).
And if you really want to jump in deep, you could even just host your own repos on your own server. There are a lot of options and services available, and all of them function relatively similarly. Would encourage you to search around and experiment.
Gabbie Metheny
33,778 PointsGabbie Metheny
33,778 PointsThank you so much for your reply, it's definitely given me some things to think about! This particular project is going to be mostly, if not entirely, front-end, but I can see how a public repo could still be problematic-- and as I plan to do more freelancing after this, I'd rather establish good habits now.
Of course there's a ton of alternatives to GitHub, that didn't even occur to me I will check those out! Have you been pretty satisfied with CodeCommit, then? Do you still use GitHub for open source and collaboration?
adefee
4,705 Pointsadefee
4,705 PointsI still use GitHub very frequently, mostly for clients already using GitHub for their organization.
CodeCommit is awesome, but a forewarning - it's via Amazon Web Services (AWS) and their console is not the easiest to navigate. The console has a learning curve all its own. That said, once you get used to it, it offers incredibly fine-grained control over every aspect. It's really moreso intended for companies & enterprise that have dedicated web administrators and/or full dev teams (I don't really freelance much anymore except on occasional side-gigs), so it might be too much work/effort to setup to make it worth your while.
BitBucket is really good, is pretty simple to get setup, and would be free for your private repos (plus has the ability for you to add [I think] up to 5 team members for free to your projects). Honestly it would probably fit your current needs best.
Gabbie Metheny
33,778 PointsGabbie Metheny
33,778 PointsThanks for the heads-up on AWS's console. I'll check out BitBucket for now, and thanks again for the help!