From: "Randall S. Becker" <rsbecker@nexbridge.com>
To: "'dayong xie'" <dayong1111@gmail.com>, <git@vger.kernel.org>
Subject: RE: When a file was locked by some program, git will work stupidly
Date: Mon, 2 Nov 2015 09:33:16 -0500 [thread overview]
Message-ID: <01b901d1157b$699cf5f0$3cd6e1d0$@com> (raw)
In-Reply-To: <CABEb4T7V=WEi-ZZm7ywOFASm+=LtAyOz53gqv-jjuzF-3=veeA@mail.gmail.com>
On November-01-15 11:57 PM dayong xie wrote:
>To be specific
>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.
What version of Unity (or Unity Pro) are you using? Is this experienced with the Commit in MonoDevelop/Visual Studio or are you using a separate git client?
I have found similar issues in some versions of Unity and MonoDevelop or Visual Studio not saving all files, especially the project files until you have fully exited - nothing to do with git, but your git commits may not contain complete images of your change.
When I use git with Unity, I either have the source committed through MonoDevelop (no issues) if my changes are source-only, or if I have assets and project changes, then I do exit completely so that I am sure Unity flushes everything to disk and I can get a single atomic commit with all the Unity and C# bits using SourceTree or gitk.
OTOH I'm not sure you really should be storing build products out of MonoDevelop or Visual Studio in your git repository. If the DLL can be rebuild automatically on the client - usual answer is yes - then let it. Handle the release build separately - at least in a separate branch that does not involve having the Unity editor open to get in the way.
In my environment, I have added *.dll (and other stuff) to .gitignore so that I do not track dll changes - they get built on demand instead. There are recommended ways of using git in the Unity forums.
Cheers,
Randall
next prev parent reply other threads:[~2015-11-02 14:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-02 4:56 When a file was locked by some program, git will work stupidly dayong xie
2015-11-02 14:33 ` Randall S. Becker [this message]
2015-11-04 21:12 ` Lasse Makholm
2015-11-02 14:41 ` Mr Guillaume Seren
2015-11-03 11:54 ` Mr Guillaume Seren
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='01b901d1157b$699cf5f0$3cd6e1d0$@com' \
--to=rsbecker@nexbridge.com \
--cc=dayong1111@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.