How do you organise your code on your machine? I don't mean github/bitbucket, but actually on your hard drive?
I always create a directory called ...
For further actions, you may consider blocking this person and/or reporting abuse
A folder called
projects/
withclients
,school
,sideprojects
andtemplates
as subfolders.What I'd really love though, is for DropBox to come with a
.gitignore
like file so I can finally stash everything on Dropbox, minus thenode_modules
and such.I'm surprised they wouldn't have that.
Right? If you google the issue you'll find hundreds of requests for it, and some workaround solutions, but if Dropbox would just natively support it, that would be so nice!
C:\Code\{project_name}
. I try to keep the complete path as short as possible, because once in a while I end up having to type the whole thing into a terminal.Almost same here!
C:\Projects\{project_name}
to keep path names short.My variation:
D:\development\projects
with SDKs or compiled libraries inD:\development\sdk
C:\git
In my home folder, I have a directory titled
Code/
, which contains all my programming work overall. Within that, I haveRepositories/
for anything tracked by Git (I also have arepos/
link in my home folder to that. I also have a few other folders for different types of code - stuff I'm studying, "firing ranges" (for testing ideas outside of Git), and so forth.firing ranges is a great term!
Almost everything's in
~/work
. I keep a~/scripts
for useful Bash/SQL/etc files that don't belong in source control and that I don't want to commit to my dotfiles for various reasons.If I'm working on a complex project with multiple modules, I'll create
~/work/projectname
and group them under that.~/Workspace/<Language>/<theme>/<project>
For example:
~/Workspace/Python/mailing/easy_mail
It helps me to keep an organized structure when I need to switch between different projects from different languages and it's more understandable when open in Sublime Text
That's really interesting!
So if you had a client side app written in JS, and an API (that complements the client side app) written in python, they would be in completely different locations?
Does that not get frustrating having them "so far apart", so to speak?
In this case, I group it into the main language folder. For example, if I have a huge project in language X but also using some Y, then I include it into the structure:
~/Workspace/X/<project_type>/<project_name>
with sub folders matching my structure (/third_parties
,/tools
, etc.)But indeed, when I will work on projects containing several languages, it would be a mess and I would change this.
I always have issues with that!! I don't know if directory layout should be techonology- or business- centric..
For example..
I am working on some little AWS project. There is current dir layout
should it be rather:
All my projects are in
/www
I use gitlab to manage my git repos and it allows me to create groups. The group names reflect the same names as the above. Even though you didn't ask for it. The way I manage my gitlab helps me navigate my hard drive very nicely.
Almost the same as the others wrote here, I do keep all my work under
~/x/projects
.The reason behind the
x
folder is historical, and I only keep it for backward compatibility (with the old me 😂). And yes, I ONLY use Linux based distros on my local machine, mostly Ubuntu.Under the "projects" dir I usually (not always, especially if it's one-time contribution) keep the subfolder names follow
{report owner}/{repo name}
convention, which basically mirrors my GitHub work (my rule is, if it's not on GitHub then it's probably in~/x/trash
)I have two directories:
~/source
for personal projects~/work/source
for company projectsThe structure in bot directories is the same. Here my work directory:
Because we working with a monorepo, I have not so many more directories in my
source
folder. Thedocument
directory contains all my presentations, nodes, etc. in a company wide available git repository.on macOS, in
/Users/<user-name>/Code/
(a.k.a.~/Code
):For example:
~/Code/github.com/dallas/grommet/
for my fork of the Grommet repo on GitHub.I use one level more than most people for OS projects:
~\Development\<github-organisation>\<repo-name>
For bespoke client development, it is
~\Clients\<client-name>\<project-name>
I prefer a somewhat more flat structure and so far keeping all my code in a
dev/
directory within my home path has worked out pretty well for me. Of course, that requires meaningful namespaces for your projects but as we all know:I have a folder "WSpace" in the home folder. So it's "/Users/Subbu/WSpace", and I have organized all the projects under two main categories Work, Personal.
--> /Users/Subbu/WSpace
----> Personal
------> Project 1
-----------> Project 2
---------> Work
-----------> Project 1
-----------> Project 2
Anything on a remote public server (GitHub, etc):
C:\User\Sources\Repos
Anything on a remote private server (Visual Studio Team Services):
C:\User\Sources\Private
Anything that never leaves my machine:
C:\User\Sources\Local
On my work laptop I am using Ubuntu so all my web projects live in sub directories of /var/www/
At home I run xampp on windows so all my web projects live in sub folders of C:/xampp/htdocs/
In both cases I can view the sites in my web browser as apache is set up to run them from there.
As for non-web projects such as desktop apps I just use the default location for visual studio projects.
I have written a free and open source software for storing various things in it, by all teams and sharing it here, through this small post: dev.to/linuxguist/storing-various-...
Pretty much the same here.
~/Projects/<project-name>
and
~/Projects/go/
since Go requires projects to be in the
go
directoryFor work related stuff:
~/workspace/{projectName}
For demos, trying new stuff out, and playing with others git repos:
~/playspace/{projectName}
I have the following structure:
~/projects/[client-name]/[project-name]/
In this folder there are 2 folders:
/briefing <= holds psd-files, pdf's, notes I make
/project <= all the code is here, under version control (github mostly, but depends on the client)
I used to have a seperate folder for my personal projects, but I find it easier to make time for them when I treat them the same as more professional, "pay for food and stuff"-projects :)
I name my dev folder '~/workspace' because... I think it's the default in Eclipse? I don't even use Eclipse anymore. It just made sense so I kept it going out of continuity.
Usually ~/dev/ProjectName
I wrote on how I organize my files here. Feel free to check it out.
~/source => repos
~/programming => misc code / projects not in source control
~/bin => scripts / executables
I have all my projects in /var/www/CUSTOMER/PROJECT
And my apache is set up with virtualdocroots
CUSTOMER.PROJECT.dev or CUSTOMER.PROJECT.devs (if webroot is in ./web)