Clear git log file

I want to clear the git log files so that the command git logdoes not return anything. Is it possible? Is this recommended?

+5
source share
1 answer
      ______________________________    . \  | / .
     /                            / \     \ \ / /
    |                            | ==========  - -    WARNING!
     \____________________________\_/     / / \ \
  ______________________________      \  | / | \      THIS WILL DESTROY
 /                            / \     \ \ / /.   .    YOUR REPOSITORY!
|                            | ==========  - -
 \____________________________\_/     / / \ \    /
      ______________________________   / |\  | /  .
     /                            / \     \ \ / /
    |                            | ==========  -  - -
     \____________________________\_/     / / \ \
                                        .  / | \  .

git logDisplays the change history of your project. If you really want to drop this whole story, you can ...

rm -rf .git
git init

... but there are relatively few situations where it really makes sense.

There are no "git log files" that git uses to generate this output; It iterates through a database of objects that form the history of your project. If you delete a directory .gitlike this, there is no return:

  • You cannot get previous versions of files from the repository;
  • , ;
  • , .
+11

All Articles