[petsc-dev] getting rid of annoying old branches

Barry Smith bsmith at mcs.anl.gov
Fri Apr 11 17:44:26 CDT 2014


  How do I get rid of these meaningless old branches?

~/Src/petsc  next $ git branch -D barry/mat-nonzero-structure-state
Deleted branch barry/mat-nonzero-structure-state (was 5b70ec7).
~/Src/petsc  next $ git branch -D barry/mat-nonzero-structure-state-2
Deleted branch barry/mat-nonzero-structure-state-2 (was 953deea).
~/Src/petsc  next $ git branch -D barry/rm-indirection-of-jacobian-in-snessetjacobian
Deleted branch barry/rm-indirection-of-jacobian-in-snessetjacobian (was 7d7ace8).
~/Src/petsc  next $ gitnotmerged 
  origin/barry/add-snespseudo
  origin/barry/august-tutorial
  origin/barry/html
  origin/barry/make-petscoptionsobject-nonglobal
  origin/barry/mat-nonzero-structure-state
  origin/barry/mat-nonzero-structure-state-2
  origin/barry/new-test-makefiles
  origin/barry/newhtml
  origin/barry/rm-indirection-of-jacobian-in-snessetjacobian
  origin/barry/saws-options
  origin/barry/superlu_mt
  origin/barry/twitter
  origin/test-barry-mat-nonzero-structure-state-2
~/Src/petsc  next $ alias 
alias gitmasternotupdated='comm -12 <(git branch -r --merged next | grep origin/ | sort) <(git branch -r --no-merged master ) | xargs -n1 git log -1 --format='\''%Cgreen%ci %C(yellow)%d%Creset %s'\'' --abbrev-commit | grep barry | sed '\''s?origin/[a-z/-]*, ??g'\'' | grep -v '\''(next)'\'' | cut -b 1-156'
alias gitmasternotupdatedall='comm -12 <(git branch -r --merged next | grep origin/ | sort) <(git branch -r --no-merged master ) | xargs -n1 git log -1 --format='\''%Cgreen%ci %C(yellow)%d%Creset %s'\'' --abbrev-commit |  sed '\''s?origin/[a-z/-]*, ??g'\'' | grep -v '\''(next)'\'' | cut -b 1-156'
alias gitnotmerged='git branch -r --no-merged next | grep barry’





More information about the petsc-dev mailing list