svn - How to use Git as content distribution network -


To use GIT as a peer to peer the content distribution network on PATR in book 'GIT Internal' , But there is not much in it detail. Specifically, there are different branches which have tracked different files. Example:

(working DIR) a00.exe a01.exe b00.exe c00.exe c01.exe c02.exe

The master branch tracks all the files, while the branch is only a .exe and a01.exe, branch B track b00.exe and so on. The next commitment will update a00.exe b00.exe c00.exe. How to make branches in this way? Once all the branches are committed, can I get some branches from remote only? Thanks!

You will need some type of script which can create different branches of content for you. The basic way to do this is to add content to the database (in your case, by making them in the master branch), then in the temporary index, reading in all the materials reading in all the branches (read git -Tree / GIT Update- Index), writing that tree (GIT script-tree), writing a committed object (GIT commit-tree) and updating the branch in that new commit (GIT update-ref). These are all plumbing commands which are not generally used in day-to-day tasks, but you get permission to create snapshots without having all the content in the directory on the disk at the same time.

An example script is something like this:

Here I define several servers that each have one or more roles ('memcache ',' Database 'or' webserver '). Then I can add content to a role like this:

  $ update_content.rb / path / to / content file_name memcache  

Add this content Will give me GIT DB, then update the branches for the affected servers (in this case there is a role of memory). I can do that, for any roles and many files for GIT, the content of each server should be kept on track. Then each server can get its own unique branch ('server / s1', 'server / s2', etc.).

I am planning to do a quick screencast displaying it soon - hopefully the example script is useful. It should be easy to run and understand what is happening. There is a 'list' script in the same project which tells which software is the branch.


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

jquery - SimpleModal Confirm fails to submit form -

php - Multiple Select with Explode: only returns the word "Array" -