[Bf-committers] Git issues and workarounds

Sergey Sharybin sergey.vfx at gmail.com
Fri Nov 22 22:29:22 CET 2013


We've been experiencing some issues with submodules which are reported
there [1].

They've turned to be an issues in Git itself and git community is looking
into them already [2]. Kudos to them :)

But there're some workarounds to prevent mess with submodules using current
git version:

Pull latest version of Arcanist. It'll fix false triggers of "uncommitted
unstaged changes" on submodules and those changes will not be sent to
codereview or landed to the main repo.

If you're using `git add .` or `git commit .` stop doing this. Two reasons
for this.

First one is that this will stage changes to submodules and place them into
commit (without notifying you about this is commit comments).

Second one that AFAIR it'll add all untracked files to your commit.
Including possible backup files, core dumps and so.

Use `git commit -a` to include changes to all tracked files and take care
of using `git add /path/to/specific/file` if you need to add new files to
the repo.

Issue with witching between branches when having uncommitted modifications
to submodules is still unsolved. I think that workaround would be to use
`git submodule update --rebase` to make sure there're no local modfications
to submodules before checkout.

To see whether there're modifications to submodules hashes use `git
submodule status`. If there's a "+" sign before the hash -- it was locally

Hope this clarifies some uncertainties for you :)
Keep pushing!

[1] http://developer.blender.org/T37528
[2] http://thread.gmane.org/gmane.comp.version-control.git/238173

With best regards, Sergey Sharybin

More information about the Bf-committers mailing list