- I have a (private) project which has a few branches, 'release', 'develop', multiple feature lines.
- There are two of us (me and @stevejalim) working on the repo. This problem happens to both of us.
- I am using purely the command line for my git commands; Steve is using a mixture of the command line and Git Tower.
- It's a Django project with a
static directory. We may have
git rmed the
static directory at some point in the past, or put it in
.gitignore, but not recently. And the head of our develop branch doesn't have
.gitignore and has files in
- This happens so infrequently that we're not sure if it's something we're doing, or an intermittent problem, a bug with Git, or a corrupted tree
- It might happen only when merging another branch back into
develop. But branches are always branched from
develop and back into
develop. But we're not sure.
We are using git-flow, but the issue happens when using non-git-flow commands, too.
As examples of when this can strike:
1) Steve had a develop branch that was clean (no changes to commit or stage) and stable. He cut a new release with
git flow release start|finish and in the process (possibly the back-merge from master to develop), the entire /static/ tree got deleted.
2) Steve repaired the delete by discarding the changes (to essentially undelete the file). But then, Steve simply switched from master back to develop and the /static/ dir got zapped again (this was with Git Tower)
3) Sometimes just merging from a feature branch to develop as an interim merge can trigger it. It does seem to happen most often when cutting a new release, though
それは/ static/dirのザッピングをどのように修復するのかと関係がありますか？削除されたものを一括取り消しする最良の方法は何ですか？ローカルの変更を破棄することも、HEADにハードリセットすることも、事態を治すことにはなりません。 rebaseは私たちを助けるかもしれない？
UPDATE We've just experienced this again simply with a
git add . - no changing branches, no merging. Does that help diagnosis at all?
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:foobarbazbam/bar.git
remote = origin
merge = refs/heads/master
master = master
develop = develop
feature = feature/
release = release/
hotfix = hotfix/
support = support/
cmd = \"/Applications/Tower.app/Contents/Resources/CompareScripts/kaleidoscope.sh\" \"$LOCAL\" \"$REMOTE\"