Where does git store changes in Rails?

孤街醉人 提交于 2020-04-30 09:09:19

问题


Reading answers to this question, we learn that changes in git are stored in .git that resides in the project's root directory. But in a normal Rails app I cannot see .git anywhere.


回答1:


On Windows, we have a folder called /.git -> this is built when we use the git add . & git commit commands. Here's a picture of it for you:

enter image description here




回答2:


.git directory is created by git, not rails.

If you don't use git to manage your rails project, there will no .git of course.




回答3:


If you use rails new app --git rails will not create a .git directory.

Usually the .git directory is a hidden folder. Under linux and mac you can show all folders and files with the ls -la command.



来源:https://stackoverflow.com/questions/19538707/where-does-git-store-changes-in-rails

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!