Skip to content

Instantly share code, notes, and snippets.

@corentinbettiol
Last active May 16, 2022 15:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save corentinbettiol/273246409bbb874423cf817ab26458af to your computer and use it in GitHub Desktop.
Save corentinbettiol/273246409bbb874423cf817ab26458af to your computer and use it in GitHub Desktop.
This tiny script will init a new git repo in a folder, and then will "clone" this repo in another folder, allowing us to test things with git-related commands in a temporary folder.
mkdir testrepo && cd testrepo # create folder
mkdir git && cd git && git init --bare # create new git repo in testrepo/git folder
cd .. && git clone git test # will clone git repo from testrepo/git folder to testrepo/test folder
cd test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment