Skip to content

Instantly share code, notes, and snippets.

@PaulCapestany
Created September 19, 2013 20:56
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 PaulCapestany/6629716 to your computer and use it in GitHub Desktop.
Save PaulCapestany/6629716 to your computer and use it in GitHub Desktop.
Simple script to create a buncha git repos in a folder containing folders (each child folder becomes a git repo) and then creates and switches to a new branch. Useful when playing around with code tutorials for example.
for i in $(ls) ; do ; cd $i ; git init && git add . && git commit -a -m "Initial commit" && git branch myFork && git checkout myFork ; .. ; done ;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment