VolT
VolT

Reputation: 17

handling of automatically updated binary files, with version control system

I currently have an IDE that changes binary files in a project just by opening and closing the IDE.

As I am new to version control the last thing I want are conflicts. So to avoid this each time I open and close the IDE I git status to see the changes, I add all files, I commit with a message " No change" or "Change in binary" and upload to my remote repo so that the masters are the same.

I get the feeling that uploading to the external repo for such change is kind of not worth while.

In the mentioned scenario I dont think anything valuable is added to the project binary file just by opening and closing the IDE.

Please advice the best way to handle automatically updated files with in a version control environment.

Upvotes: 0

Views: 90

Answers (1)

elmart
elmart

Reputation: 2374

First, you should know if the file contains anything that you need to share with your team mates, or if it doesn't. Most IDE's nowadays separate the information they maintain into files you need to share and files only for a particular user (with your local settings, the position of your windows, and stuff like that, of interest only to you).

Also, try to find out if your IDE supports maintaining that info in text files, and not binary files. Most IDE's do, and it's much better for versioning (to be able to see what the changes are).

That said, you will have then several options regarding the problematic file:

  • It contains both shared and particular info: Sorry, you can do nothing. You must continue doing what you do.

  • It contains only particular info: Then, it makes no sense that you control-version this file. So:

    • First, remove it from version control: git rm --cached <file>.
    • Then, tell git to ignore that file from that point on: Create a file .gitignore in your directory. There, add the path to your file (search the web for more details about .gitignore). Then, add .gitignore to version control and commit that: git add .gitignore && git commit -m "<whatever>".

Upvotes: 1

Related Questions