Usually git repositories start small but they grow fast and ultimately you end up with a looottt of commits after a few years… It can be challenging and time consuming to pull such big repositories so let me give you a quick tip if you don’t want to pull the full commit history and save some time.

The following command will create a shallow clone of the repository and pull a single branch (master) with the latest 50 commits:

git clone -b master [email protected]:bcExpt1123/Commited.git --depth 50

(you may want to add --shallow-submodules if you have submodules in the repo)

Going to the directory and run git rev-list --count HEAD returns the value 50 to the prompt – which confirms that 50 commits were successfully pulled. Besides not having the full history of the git commits, it’s still possible to commit to the branch and push to it – it won’t override or delete any of the older commits, neat!

Take a look to the Git documentation for more git clone options.

Happy git cloning! :smile: