如何在rails中取回我的routes.rb(意外删除)文件?

时间:2021-07-20 23:11:53

I accidentally deleted my routes.rb file. Lots of code were there. Is there any way to get back routes.rb file?

我不小心删除了我的routes.rb文件。那里有很多代码。有没有办法找回routes.rb文件?

1 个解决方案

#1


1  

I think we need some more information. Specifically:

我想我们需要更多信息。特别:

  • How did you delete the file?
  • 你是怎么删除这个文件的?

  • Approximately how many lines of real code did you lose?
  • 你丢失了大约几行实际代码?

  • Are you using any form of version control (Git? Mercurial?)
  • 你使用任何形式的版本控制(Git?Mercurial?)

  • Do you have any other forms of backup for your files?
  • 你的文件有其他形式的备份吗?

If you're not backing up your information, this is going to happen and it's going to be terrible. I strongly advise you to start using Git (and Github) if you aren't already, to prevent this from happening in the future.

如果你没有备份你的信息,这将会发生,而且会很糟糕。我强烈建议你开始使用Git(和Github),如果你还没有,为了防止将来发生这种情况。

#1


1  

I think we need some more information. Specifically:

我想我们需要更多信息。特别:

  • How did you delete the file?
  • 你是怎么删除这个文件的?

  • Approximately how many lines of real code did you lose?
  • 你丢失了大约几行实际代码?

  • Are you using any form of version control (Git? Mercurial?)
  • 你使用任何形式的版本控制(Git?Mercurial?)

  • Do you have any other forms of backup for your files?
  • 你的文件有其他形式的备份吗?

If you're not backing up your information, this is going to happen and it's going to be terrible. I strongly advise you to start using Git (and Github) if you aren't already, to prevent this from happening in the future.

如果你没有备份你的信息,这将会发生,而且会很糟糕。我强烈建议你开始使用Git(和Github),如果你还没有,为了防止将来发生这种情况。