I have a git repo where I only want to download certain subfolders. My config looks like this:
#.git/config
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
sparsecheckout = true
[remote "dreamhost"]
url = <repo url>
fetch = +refs/heads/*:refs/remotes/dreamhost/*
[push]
default = tracking
In .git/info/sparse-checkout
i had this:
themes/theme1
themes/theme8
which are the folders within the themes
subfolder that I want to get. (I don't need the others, which are many).
If i do a git/pull I can see git fetching lots of stuff, including the themes
subfolders which I don't want, which is fine. I know that sparse-checkout still pulls down the objects.
I now want to have a copy of themes/theme15
, to make some changes. So, I edited .git/info/sparse-checkout
thus:
themes/theme1
themes/theme8
themes/theme15
and then did a git pull dreamhost master
, thinking that git would add the theme15 folder under themes
. But, nothing happens - it just says
From <repo url>
* branch master -> FETCH_HEAD
Already up-to-date.
and the folder's not there. Can anyone tell me what I'm doing wrong? Is there an extra step after editing .git/info/sparse-checkout
?
thanks, Max
EDIT: this is in git version 2.8.1
btw