3. 25.04.17 Igor Khokhriakov 3
Git
“Git was created by Linus Torvalds in 2005 for
development of the Linux kernel, with other kernel
developers contributing to its initial development.”
Wikipedia.org
According to StackOverflow survey 2017 ~70% of
developers are using git
4. 25.04.17 Igor Khokhriakov 4
Key points about Git
● Strong support for non-linear development
– a core assumption is that a change will be merged more
often than it is written
● Distributed development
– Git gives each developer a local copy of the full
development history
● Efficient handling of large projects
– an order of magnitude faster than some version control
systems
6. 25.04.17 Igor Khokhriakov 6
GitHub
● Hosting that provides git service
● Suddenly became a central feature in git
ecosystem
– My personal experience is that back in 2012 they
did not have even in-line commit comment (vs
bitbucket)
7. 25.04.17 Igor Khokhriakov 7
Summary
SourceForge/svn = GitHub/git
aka Hosting/repository
SourceForge/svn ≠ GitHub/git
GitHub provides tons of features and
integrations: travis, appveyor, read-the-
docs, ...
18. 25.04.17 Igor Khokhriakov 18
Keep in mind
● Git is very powerful and flexible
– github.com/tango-controls/cppTango
● Merged 4 repositories
● Preserved commits history
● Preserved branches
Do not hesitate to google the
most astounding ideas
aka How can I do X in git
22. 25.04.17 Igor Khokhriakov 22
Build using cmake
● $> mkdir build
● $> cd build
● $> cmake ..
● $> make
● $> make install
… better use IDE like CLion
23. 25.04.17 Igor Khokhriakov 23
CMake guide lines
● Use the following directory structure:
– configure
– include
– docs
– src
– test
● Use dedicated project when configuration is totally different
from the root project
24. 25.04.17 Igor Khokhriakov 24
CMake guide lines
● Split complex project into modules
– add_library(my_module OBJECT …)
● Use CTest for integration testing. Unit tests
must be independent
● Use CPack to generate packages and custom
targets to deploy them
– add_custom_target(COMMAND curl ...)
25. 25.04.17 Igor Khokhriakov 25
Where get help?
● No good book :(
● Find some open-source project and explore it
– https://github.com/pni-libraries/libpnicore
– https://github.com/ufo-kit/ufo-core
● CMake itself... for gurus