Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
en:git:git-subtree [2011/12/27 03:57]
alex
en:git:git-subtree [2012/01/14 08:39]
alex
Line 1: Line 1:
 ====== git-subtree ====== ====== git-subtree ======
  
-Sometimes projects can have complex relationships. ​ Perhaps a project develops a utility or libary internally that ends up becoming its own separate project. ​ Perhaps a project uses a particular library, but adds some features to it in their own repository. ​ How are these commits reconciled? ​ One method is the use of the script [[github.com/​apenwarr/​git-subtree|git-subtree]]. ​ It is a very handy tool that allows for a repository to be associated with a directory or subtree of a different repository, yet allow for bi-directional transfer of commits.  ​+Sometimes projects can have complex relationships. ​ Perhaps a project develops a utility or libary internally that ends up becoming its own separate project. ​ Perhaps a project uses a particular library, but adds some features to it in their own repository. ​ How are these commits reconciled? ​ One method is the use of the script [[http://github.com/​apenwarr/​git-subtree|git-subtree]]. ​ It is a very handy tool that allows for a repository to be associated with a directory or subtree of a different repository, yet allow for bi-directional transfer of commits.  In Arch Linux, git-subtree is in the AUR as ''​git-subtree-git''​ so it can be installed with yaourt with ''​yaourt -S git-subtree-git''​.  ​
  
 Some time ago, I started working on a project that involved using XBee ZigBee radios from Digi.  Unfortunately,​ the software provided is windows-only and is lacking some very important features, like packet generation and decoding. ​ As a part of the project, I worked on a cross-platform open source re-implementation of a ZigBee terminal that can talk to the XBee radios in packet mode and create and decode packets with a nice interface. ​ The application evolved to the point where it would be nice to split it off into its own repository. ​ So, I installed git-subtree and went to work.  Or not.  The documentation is really bad if you're not a git expert. ​ After consulting the oracle of google, I discovered a very good [[http://​psionides.eu/​2010/​02/​04/​sharing-code-between-projects-with-git-subtree/​|blog post]] on the matter. ​ Please see the link for the details as Jakub does a much better job of explaining it than myself.  ​ Some time ago, I started working on a project that involved using XBee ZigBee radios from Digi.  Unfortunately,​ the software provided is windows-only and is lacking some very important features, like packet generation and decoding. ​ As a part of the project, I worked on a cross-platform open source re-implementation of a ZigBee terminal that can talk to the XBee radios in packet mode and create and decode packets with a nice interface. ​ The application evolved to the point where it would be nice to split it off into its own repository. ​ So, I installed git-subtree and went to work.  Or not.  The documentation is really bad if you're not a git expert. ​ After consulting the oracle of google, I discovered a very good [[http://​psionides.eu/​2010/​02/​04/​sharing-code-between-projects-with-git-subtree/​|blog post]] on the matter. ​ Please see the link for the details as Jakub does a much better job of explaining it than myself.  ​