简体   繁体   English

Git - 如何将 git 存储库恢复到普通目录?

[英]Git - How can I recover a git repository to a normal directory?

How can I recover a git respository to a normal directory?如何将 git 存储库恢复到普通目录? I made some tests but I only get delete the files.我做了一些测试,但我只能删除文件。

Explaining better, I want to remove git from the directory, keeping the files without git versioning.更好地解释,我想从目录中删除 git,保留没有 git 版本控制的文件。 "transform" git directory to a normal directory.将 git 目录“转换”为普通目录。

  1. Make sure you're on the branch with the file versions you desire.确保您在具有所需文件版本的分支上。
  2. Delete the .git folder删除 .git 文件夹
  3. Delete the .gitignore file (if one exists)删除 .gitignore 文件(如果存在)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM