Skip to content

Instantly share code, notes, and snippets.

@hettiger
Last active February 1, 2020 14:58
Show Gist options
  • Save hettiger/d091934cadcb1662b682b499f7b60dbf to your computer and use it in GitHub Desktop.
Save hettiger/d091934cadcb1662b682b499f7b60dbf to your computer and use it in GitHub Desktop.
~/Developer Directory Structure

Developer

A directory where all the source code lives. Do not put any additional project files in here.
Instead organize such files under ~/Documents.

Suppose you have a directory for additional project files ~/Documents/…/Some\ Project:

It is advisable to create a symlink pointing to the corresponding source code directory.
You should also add a .url file that is linking to the corresponding repository on GitHub or the like.

Example
ln -s ~/Developer/github-com/user/repository/ ~/Documents/…/Some\ Project/Source\ Code
echo "[InternetShortcut]\nURL=https://github.com/user/some-project\n" > GitHub.url

Directory Structure

~/Developer
├── README.md
├── experiments (1)
│   ├── 2020-12-31--project (2)
│   └── 2020-12-31--scratch-file.playground
├── github-com (3)
│   ├── organization
│   │   └── repository
│   └── user
│       └── repository
├── gitlab-hettiger-com (3)
│   ├── group
│   │   ├── repository
│   │   └── subgroup
│   │       └── repository
│   └── user
│       └── repository
├── legacy (4)
│   └── project
└── private (5)
    └── repository
Description
1 Throwaway source code; may be a playground or a prototype; usually not a tutorial project.
2 Enforced Y-m-d naming scheme; reasonably old experiments may be deleted at any time.
3 Valuable source code; projects to keep; must be a Git Repository.
4 Legacy source code; old projects to keep; currently not worth migrating to a Git Repository.
5 Private Git Repository; projects to keep; pushing to remote is not an option.

Don't abuse the legacy directory for new projects that you don't want to create a repository for.
Every valuable project that is actively being worked on should become a Git Repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment