3 ms·
Keeping Parts of Your Codebase Private on GitHub
- jewel 13y agoAn interesting way to share a private repo is with a sync tool such as dropbox or btsync. In short, you create a bare repository locally, add that as a remote, and then share the bare repo. Detailed instructions about halfway through this blog post: http://stevenjewel.com/2013/09/cloudless/ http://stevenjewel.com/2013/09/cloudless/
- theboss 13y agoIm very interested what advantages this has over gitignore?
- pdwetz 13y agoIf you use gitignore, the file(s) will only be local so they won't be accessible by other team members (or yourself on a different machine) and may not be backed up at all (depending on your strategy).
- Kronopath 13y agoUnfortunately, this only works if you want to keep parts of your repository private temporarily, never merging them into master, and not if you want to keep certain files or folders private permanently (when dealing with private API keys and the like).
- parennoob 13y agoA suggestion. > You will need a paid github account This should probably be the first line in the article, possibly even as a broad "NOTE" above the entire post. On the positive side though, this introduced me to showterm, which looks amazing. Why don't more people use it for their 'casts?
- ameyp 13y agoWouldn't it be easier and cleaner to just keep the private parts in a git submodule?
- mzahir 13y agoYou can have multiple git repositories within each other so you could just `git init` in the directory you want private, add it to the parent repo's .gitignore and point it to a different remote.
- CmonDev 13y ago"I want the code to be open source so that people can poke through and learn from it, but I want to keep any draft blog posts private until they are ready to go live." - the problem seems mixing code and content. I would recommend decoupling on repo-/ NuGet-package level.