Skip to content

Instantly share code, notes, and snippets.

@ignaciotcrespo
Last active March 13, 2024 04:04
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ignaciotcrespo/02ecf59692849662f5b3 to your computer and use it in GitHub Desktop.
Save ignaciotcrespo/02ecf59692849662f5b3 to your computer and use it in GitHub Desktop.
git clone a specific branch, ONLY the latest commit without history, and wipe out folder before
# wipe out folder. Added manually the .git folders due to cant find a good command to delete everything in macos & linux
rm -rf .git
rm -rf .git*
rm -rf ./*
# clone branch, fast way to get a specific branch without the complete history
git clone -b ${BRANCH_TO_BUILD} --depth 1 --single-branch ${REPO_URL} .
@anovsiradj
Copy link

nice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment