Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Content] 101-3: Source Organization #15

Open
karnkaul opened this issue May 30, 2021 · 1 comment
Open

[Content] 101-3: Source Organization #15

karnkaul opened this issue May 30, 2021 · 1 comment

Comments

@karnkaul
Copy link
Member

karnkaul commented May 30, 2021

Expand the 101 series by adding a post about managing a project's source tree.

Salient points to cover:

  • Pitchfork layout (quick brief + hyperlink)
  • Include paths and directories
    • Why #include <> and not #include ""
    • How to add include paths for a CMake target
    • How to organize include paths and subdirectories for modular and portable #includes
  • Why lowercase filenames
  • .gitignore setup
    • out/, build/, .vscode/, .cache/ etc
    • compile_commands.json
  • Branching strategies
    • Continuous vs versioned software; C++ projects are the latter
    • "The" git branching model vs GitHub flow
    • All branches must converge to a "common future"; only exception is automated branches like gh-pages (not applicable for C++ projects)
    • Minimize number of persistent branches
    • Use short lived feature / topic branches for development
    • Use tags to mark versions on commits (useful for releases and libraries)
@karnkaul karnkaul changed the title [Content] 101-3: source tree management [Content] 101-3: source organization May 30, 2021
@karnkaul karnkaul changed the title [Content] 101-3: source organization [Content] 101-3: Source Organization May 30, 2021
@hentai-chan
Copy link
Contributor

I would add the following, too:

  • git submodules
  • clang-format (think this has been mentioned elsewhere but one reason to repeat this point would be that this way, the article could stand well on its own)
  • DevOps (nice to have checks for PRs in group projects)
  • DevSecOps (what I am currently writing about, but some lessons also extend to C++ / other languages in general)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants