The Linux system code reference code repository will become larger and larger during use, and some invalid files are accumulated. All of the Linux Git and Repo code should be cleaned up after a while. So how to clean up Git and Repo invalid code in Linux system?
manually clean
If your code repository problem is relatively small, only a few documents should not be submitted, it can directly use this method to clean up
approximately The process is as follows:
First Git garbage collection:
git gc --auto
Next, check the Git repository footprint:
$ du -hs . Git/objects45M .git/objects
Then find out files of a certain size in history, and finally delete and commit in history. If you are interested in manually processing this process, you can refer to the link behind the article.
Related commands:
Clean up files in history:
git filter-branch --force --index-filter ‘git rm --cached - -ignore-unmatch ****/nohup.out’ --prune-empty --tag-name-filter cat -- --all
git filter-branch --index-filter ‘git rm --cached --ignore-unmatch ****/nohup.out’ HEAD
git for-each-ref --format=“%(refname)” refs/original/
To avoid wasting extra space on the system, it is necessary to extend the XFS file system. How do yo
Ubuntu sudo command is mainly used to improve account permissions, which can save time and improve t
The PPA repository is a software depot designed for Ubuntu users and is easier to u
for Linux RRDtool is a way to store data, is a powerful drawing engine, so how to use RRDtool on Li
Linux rename command file renaming usage summary
Ubuntu steps to install PlayOnLinux
The method of configuring OpenWRT routing is detailed
How to use rz/sz tool for file transfer in Linux
How to modify the Tab in the VIM editor to 4 spaces
How to use the vmstat command in Linux
Linux recovery steps for deleting files by lsof command
What should I do if Linux cannot be full screen under VMWare VM?
Difference between Linux exit command and _exit command
Storm video playback QuickTime specification MP4
How can the win10 system boot into the tablet mode
What should I do if the Windows 7 system broadband connection always jumps out?
How to use the beaver nest ppt video converter Use the beaver nest ppt video converter tutorial
How does Win8 view the original path of the calculator?
Win10 preview home version 10163 online screenshot exposure
Windows 7 restore system hidden files two ways
Worry-free system assistant how to reinstall win7 system