Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AquariusPower/ef4e9f8e9d9a9359feeb07dc95cb804f to your computer and use it in GitHub Desktop.
Save AquariusPower/ef4e9f8e9d9a9359feeb07dc95cb804f to your computer and use it in GitHub Desktop.
How To Let Project Files For Many Developers Be Commited On The Same Repo

my .gitignore added text:

######
## Eclipse developers preferences over different operational systems
## and personalized configurations.
######

# link to some user folder at /.devsPrefs
/.devsPrefs/Current

# direct links to preferences at /.devsPrefs/Current
/.cproject
/.project
/.settings

# Git ignore files are special. They are relative to their current path!
# If the one at '/.devsPrefs/SomeUserName/.gitignore' remains named like that,
# git will recognize and ignore files as that sub folder is a root folder!
# Therefore ONLY that file must be named like: '/.devsPrefs/SomeUserName/.gitignore.SomeUserName'
# And after creating the link to it, the link itself must be renamed to '.gitignore' to be again recognized by git.
/.gitignore

Here are the symlinks each user can easily create thru drag-n-drop like in Nautilus (on linux):

.cproject -> .devsPrefs/Current/.cproject
.gitignore -> .devsPrefs/Current/.gitignore.SomeUserName1 
.project -> .devsPrefs/Current/.project
.devsPrefs/Current -> SomeUserName1     # this link is to the current user selected preferences folder

real directories with custom preferences, ex.:

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