Skip to main content

Posts

Showing posts from March, 2023

single-branch parameter in the git clone

Despite having a small amount of storage on your local, do you need to do a task in a specific branch of git? Or, for a variety of reasons, you might only wish to clone a certain branch's files? Git, fortunately, allows the flexibility to accomplish this with single-branch parameter. What is the single-branch parameter in the git clone? It allows you to only fetch files from the specified branch and only tracks that branch without fetching other branches. git clone -b <branchname> — single-branch <remote-repo-url> Or git clone — branch <branchname> — single-branch <remote-repo-url>