wlanboy

tutorials and ruby scripts

Read my tutorials

Tutorial

Tutorial: usefull-git-commands

Usefull git commands for daily work

Steps:

  • push current repro to another repro
git push --mirror http://127.0.0.1:3000/my-other-repo.git
  • list all branches of all git repros from current directory
ls | xargs -I{} sh -c 'echo {} && git -C {} branch -a'
  • clone all repros from one github user
curl "https://api.github.com/users/wlanboy/repos?per_page=100" | grep -o '[email protected][^"]*' | xargs -L1 git clone
  • git credential cache with timeout
git config --global credential.helper cache
git config --global credential.helper 'cache --timeout=600'