Last active
August 25, 2024 15:30
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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} . |
git clone -b ${BRANCH_TO_BUILD} --depth 1 --single-branch ${REPO_URL}
nice one its working fine
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
nice