Home > Back-end >  Deleting a few files in .git/logs/refs/remotes/ directory
Deleting a few files in .git/logs/refs/remotes/ directory

Time:10-06

There are 3 empty files (with names of branches apparently) in .git/logs/refs/remotes/ directory that I want to delete, to make a repository portable to Windows (because their file names are colliding with 3 others that differ in case).

Will I lose anything with this operation? Will it affect anything in my repository?

CodePudding user response:

No, you will not lose anything, especially since the files are empty.


Files under .git/logs store the reflog for each named ref -- the output of git reflog branch-name or git reflog origin/branch come from these files.

They will be recreated if needed, and the only impact you can have is if you delete a non empty reflog.


Note that the most important of these reflog file is arguably .git/logs/HEAD, and I would strongly advise to keep that one and not delete it.

.git/logs/stash also has a role : it contains the data for git stash list.

  •  Tags:  
  • git
  • Related