The command git clone --single-branch
allows us to clone just a single branch, instead of pulling everything at once. For large repositories, this can significantly improve performance. For us, it cuts down waiting time in half when doing checkouts, commits, rebases, logs, etc.
Due to our environment configuration, it is not possible to drop the entire git repository and re-clone it. So, I'm wondering how I can achieve the same performance improvements of only cloning and maintaining only the master
branch with git clone --single-branch
, but without deleting the repo and re-cloning it with the --single-branch
parameter.