1

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.

2 Answers 2

2

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>".
Sign up to request clarification or add additional context in comments.

Comments

0

I would like to add a case @elmart did not mention: if you are sure, those file changes don't mean anything, just discard them, after you closed your IDE. (For example you just opened the IDE for reading the code, or you just needed to recompile the project to use it, discarding won't break anything for your colleagues... well, sure, there is shitty proprietary cloud-operating software, which might stab you in the back, so you should be careful, when using SaaS.)

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.