Can a Git Branch Contain Only a Sub-Set of the Repository?
September 24, 2013 8:21 PM Subscribe
I'm new to Git but as I understand it, a branch is typically for working with a copy of all the files. Would it work for what I have in mind, if the branch only contains a sub-set of those files?
posted by dylan_k to computers & internet (9 answers total) 4 users marked this as a favorite
I hope this group is a good place to ask questions like this. I'm new to version control, but I'm quickly finding Git to be a great way to manage my collection of writings. I do have a question, though. I have, for example, a repository that contains 200 .txt files. Each one is the text of a poem. Now, I'd like to set aside 20 of those files, for example, to create a manuscript. While I'm working with those 20 files and thinking of them as a group, I may make changes to them. I would like, of course, for those changes to be reflected in my "master" repository of all 200 files. Is there a way to manage such a thing with a Git branch? As I understand it, a branch is typically for working with a copy of all the files. Would it work for what I have in mind, if the branch only contains a sub-set of those files?
Thanks for any advice you may have,