0

Fucking hell. Have a question regarding intellij idea and configuration sharing in GIT. In our project we have target application configurations which are in workspace.xml so we shared workspace.xml in GIT, which was a big mistake. Now with every commit a new workspace.xml gets commited. If we remove workspace.xml from git then we will loose target application configuration.

How to fix this?

We want to share target app configs but we don't want to spam each commit with new workspace.xml changes synced from local repo.

Comments
  • 0
    Can you try to put that specific file to your .gitignore? This way it will be downloaded from remote as usual but will be ignored when you are committing.
  • 0
    Nevermind found my answer. In case someone is interested, it's here https://stackoverflow.com/a/...
  • 2
    @aviophile Doesn't work like that. Once you upload a file to GIT you can't disable tracking for it, even with the help of gitignore. As soon as you modify that file it will show up as modified.
  • 1
    @aviophile

    Actually there is an option to disable git file tracking by using "git update-index --skip-worktree <path-name>" but this applies only to local repository, so every developer would have to run that command everytime he checks out the repo. So best option in this case was exporting run/debug configurations.
  • 0
    @zemaitis I mean, round about solution, you save a back up, delete it, push the deletion, add it to .gitignore, push that, then put the workspace.xml back where it belongs. Share the right workspace.xml on intranet.
  • 0
    Intellij devs must be kidding if it still isn't added to .gitignore automatically for you. Personally, one of the reasons for me to fall back on VSC, which doesn't create amounts of weird meta files literally for every new project.
  • 0
    @zemaitis your solution was what I had in mind. I don’t know why git made late ignore operation harder than single command, regardless of the op’s problem.
  • 0
    @zemaitis git rm -rf ...

    Deletes a file from the workset pretty permanently.
Add Comment