top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

When a file was locked by some program, git will work stupidly

+2 votes
266 views

In my Unity project, there is a native plugin, and plugin's extension is .dll, and this plugin is under git version control, when Unity is running, the plugin file will be locked.

If I merge another branch, which contains modification of the plugin, git will report error, looks like:

error: unable to unlink old 'xxxxxxx/xxx.dll' (Permission denied)

This is not bad, however, the unfinished merge action will not revert by git, a lot of changes produced in repository. Usually it makes me crazy, even worse, some of my partners are not good at using git. Of course, this problem can be avoided by quit Unity, but not every time we can remember. In my opinion, git should revert the unfinished action when the error occurred, not just stop.

posted Nov 2, 2015 by anonymous

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Similar Questions
+1 vote

I'm getting this warning:

warning: Could not find section in .gitmodules where path=XXX

whenever I use "git mv" to move a file in a repository containing a submodule. The file is outside the submodule and is completely unrelated, so I do not understand the intent of the warning.

My understanding (without looking at the code in detail) is that Git tries to be clever about submodule renames, hence checks whether the source file is a submodule. But then if the lookup fails, it should just silently move on to "normal file move" mode I guess...

+1 vote

Can git blame show the date that each line was merged to the current branch rather than the date it was committed?

Aside: in some trial and error I notice this oddity:

 $ git blame --merges
 usage: git blame [options] [rev-opts] [rev] [--] file

 [rev-opts] are documented in git-rev-list(1)
 ...

 $ git help rev-list | grep -F -e --merges
 [ --merges ]
 --merges
 --min-parents=2 is the same as --merges.
--max-parents=0 gives all
0 votes

I've got a new developer who I'm concerned might hurt our git repository (by checking into master for example) if we give him r/w access to our bitbucket repo. I want him to be able to check in to his branch only and be able to merge master changes to his branch, but I don't want him to be able to commit to the master branch.

0 votes

I have a problem with an already committed file into my repo. This git repo was converted from svn to git some years ago. Last week I have change some lines in a file and I saw in the diff that it is marked as binary (it's a simple .cpp file). I think on the first commit it was detected as an utf-16 file (on windows). But no matter what I do I can't get it back to a "normal text" text file (git does not detect that), but I is now only utf-8. I also replace the whole content of the file with just 'a' and git say it's binary.

Is the only way to get it back to text-mode?:
* copy a utf-8 version of the original file
* delete the file
* make a commit
* add the old file as a new one

I think that will work but it will also break my history.

Is there a better way to get these behavior without losing history?

+1 vote

I would like to know why GIT calculates checksum of a file.Typically, checksum is used for the purpose of integrity. An example would really help.

...