Yes partly. I wanna to get via "git submodule add http://example.com/submodulex.git" only data (commits & files) of master branch and avoid of downloading any other commits of other branches. But I dont want to lose ability to update master branch with new commits. And in best way dont lose the ability of uploading new branches into main server.
Yes i know, that this is little bit against git philosophy. But i can say, that i will have fully separate and full-sufficient part of main git repo with only master commits. Examples: So result should be after adding of module something like this: master branches of these two git repos will be identical, but non of commits of project1,project2 only couldn't be found on Local server. Main server: SubmoduleX (lets say 10MB of space) branches: master, project1, project2 Local server: SubmoduleX (lets say 4MB of space) branches: master 1) If i will make on Local server any changes i will be able to push that changes into master branch. Main server: SubmoduleX (lets say 10,2MB of space) branches: master(new commits recieved here), project1, project2 Local server: SubmoduleX (lets say 4,2MB of space) branches: master(new commits pushed from here) 2) If I will make new branch project3 .. i will be able push it on main server, and then update it. Main server: SubmoduleX (lets say 11MB of space) branches: master, project1, project2, project3 Local server: SubmoduleX (lets say 5MB of space) branches: master, project3 In both of these cases i still dont wanna get(fetch,pull) any commits of project1,project2 branches. Hope it makes more sense, than before. Thanks for any help. Nedvajz. On Saturday, 30 June 2012 13:55:01 UTC+2, Thomas Ferris Nicolaisen wrote: > > Hi, > > Could you try explaining in simpler terms what you are trying to do? > > My first guess is that you have a big repository with three branches, and > you want to split it into three repositories, one for each branch. Is that > correct? > > On Friday, June 29, 2012 4:13:09 PM UTC+2, Nedvajz wrote: >> >> Hi, >> is there a way, how to pull/clone (somehow) only commits of one, and only >> one branch? >> >> For example: >> 1) Lets say i have 3 branches in one submodule. Master(commits 1,2,3,4) , >> Project1(commits 1,2,3,4,5) , Project2(commits 1,2,3,4,6,7,8). >> >> 2) I am starting with Project3 and wanna to get submodule Master branch >> only -> "git submodule add --only_specific_branch_commits >> http://example.com/submodule.git" >> >> 3) Now i will look into submodule, and "git branch -v" will show me only >> master, and as well "git branch -vr" show me only origin/master ... >> And if i will try to git cherry-pick 5 on Master branch-> where 5 is >> commit of Project1 only, there wont be any entry in history or so -> so it >> fails >> >> Why I am looking for something like this? >> We have cms for making Sites composed from submodules and via sumbodules >> we can easily modificate what cms can/cant. >> But always is there needed to specify one of plugins directly for that >> project and there are changes useless for another projects. >> So we made it till now via specific branch to get exactly what we need. >> But after many and many projects, the repo of the most specified >> plugins(modules) is going to be huge and it is not needed at all to get all >> commits of all projects into new one, but just the clean master branch with >> their commits. >> >> Thanks for any help, Nedvajz. >> > -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To view this discussion on the web visit https://groups.google.com/d/msg/git-users/-/MQw6GhiFqn0J. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.