Is there a simpler solution than what I have tried?
I want to start a git project with come friends and I have already created a template with all relevant libraries (so they don't have to add them manually). How can I make sure now, that they get the libraries and we can all modify those files without them being pushed, even though they have been changed by each of us?
I found a solution, that should work: I commit and push the template and everyone clones the repo. Then everyone has to do the following:
create a .gitignore including all libraries
remove those files from the repo (
git rm --cached <all the lib files>
)add the changes to the staging area (
git add .
)pull the remote (with single template commit) and push it again
This should work, but for greater groups it must be done differently, so I wonder whether there is a better way to solve this problem? General descriptions about working in groups with git are desired, too.
NOTE: the mentioned library files stand for various files in our project, that are to be kept in the local repository, but not in the remote one (so they are not pushed/pulled). e.g. .classpath, .profile, /bin, ... (eclipse java project): those files ARE changed locally by each user, but should of course not be pushed back!