Simulink Project Git, how to restore delete file?

3 次查看(过去 30 天)
I right clicked a file and 'Remove from Project' then the file disappeared from harddrive. Tried revert local changes on .SimulinkProject folder. No luck : (
Not even prompt for keeping local copy or not. And there is not recycle bin.
I can only imagine Simulink Project Git is not that mature yet.
Now it's not that disastrous thanks to easy copy and paste in Simulink. If there is no existing feature of restoring accidentally delete file, please at least add a message box alerting user about burning local copy.
  3 个评论
Thomas
Thomas 2014-9-29
Hello legendbb,
I have the same problem.
I am testing the new release (2014a), especially Simulink Project in order to manage our development projects in future.
Now I have the following problems with deleting files and synchronisation:
1) How can I restore a deleted or removed file? In both cases the file disappears from "All Files" and can not be selected. According to this "Revert local changes" also can not be selected. No revision can be selected and the "Revert to Head" in Managing Branches does not not restore the file.
2) If I add a file in a local repository, commit this file and push it up to the remote repository, this file will not appear in the Project Files of the remote repository. The File can be found in the Modified Files, but it is declared with an GIT Status of "DELETED"! If I commit this modification, the file will be deleted and does not appear in the project files and the branch is declared as up to date, but locally the file is part of the project. So there exist a inconsistency. If I revert the branch to head via branch managing the file appears in the project files and the remote repository looks the same as the local repository.
Perhaps I do something wrong, but I am a little confused. I thought that the remote repository should simply be updated with the new file and this one would appear (without the need of commit or revert to head) in the project files, because there is no conflict.
I really appreciate if someone could help us with this issues.
Thank you very much!
Tim Hosey
Tim Hosey 2014-11-19
Hi Thomas,
It sounds like you might be pushing to a non-bare remote repository. Doing this will not result in the files appearing in the remote's working copy. When working collaboratively a more effective set up is to have multiple local repositories reference a common bare remote repository. The following answer describes this problem in more detail.
Regarding restoring a deleted file, the following answer provides information on how to do this.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Dependency Analysis 的更多信息

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by