Created
March 19, 2024 23:33
-
-
Save sprobejames/0d64bb79121ff77b7fd42145407028e2 to your computer and use it in GitHub Desktop.
Bash script to clone a template and merging the commit history into one.
This file contains hidden or 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
| #!/bin/bash | |
| # Create Empty Directory | |
| mkdir -p FOLDER_NAME | |
| cd FOLDER_NAME | |
| git init | |
| git fetch --depth=1 -n REPO_REMOTE_ORIGIN | |
| git reset --hard $(git commit-tree FETCH_HEAD^{tree} -m "Initial Commit") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment