Skip to main content
Post Reopened by brian d foy, Sled, Kevin Panko, Dennis Meng, Eric Brown
Focused on the question at hand, and added my initial example
Source Link
joseph.hainline
  • 27.1k
  • 18
  • 56
  • 70

I've got a large repo that takes a while to clone, and I want my CI box to go faster. HowHow do I shallow clone a repogit repository, so that my clone contains only 1 history item, and starts on a specific branch?

I know how to do a shallow clone:

git clone --depth 1 https://path/to/myrepo.git

but not start the clone on a specific branch.

I've got a large repo that takes a while to clone, and I want my CI box to go faster. How do I shallow clone a repo, so that my clone contains only 1 history item, and starts on a specific branch?

How do I shallow clone a git repository, so that my clone contains only 1 history item, and starts on a specific branch?

I know how to do a shallow clone:

git clone --depth 1 https://path/to/myrepo.git

but not start the clone on a specific branch.

Post Closed as "Not suitable for this site" by Zombo, patthoyts, wattostudios, giammin, Steen
Source Link
joseph.hainline
  • 27.1k
  • 18
  • 56
  • 70

How do I shallow clone a repo on a specific branch?

I've got a large repo that takes a while to clone, and I want my CI box to go faster. How do I shallow clone a repo, so that my clone contains only 1 history item, and starts on a specific branch?