Warning: Cannot modify header information - headers already sent by (output started at /data/web/virtuals/85063/virtual/www/domains/waldauf.org/lib/plugins/color/syntax.php:1) in /data/web/virtuals/85063/virtual/www/domains/waldauf.org/inc/actions.php on line 180
sw:git - WiKi

GIT

Work with central repository

  • Display all branches in central repository
    $ git branch -r
  • Removing remote branch from central repository
    git push origin --delete <branch_name>

Work with working directory

Branch

  • How to fetch all branches: for me allways works using git branch –track <remote_branch>
    for remote in $(git branch -r | grep -v "HEAD"); do git branch --track $remote; done
  • Creating and switching into new branch
    git checkout -b <master-2> master
  • Switch to another branch
    git checkout <master-2>
  • Creating new branch on central repository
     git push origin <master-2>
Navigation
Print/export
Toolbox