Guest User

Untitled

a guest
May 16th, 2018
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. # This is useful for repositories holding several stages of a same example, as some teachers do for their class examples.
  2. # This strategy is useful for showing different steps of the construction of a piece of software.
  3. # The problem is that if you have to change something in one of the initial branches, you have to rebase all following ones.
  4. # This script can help automate that process.
  5.  
  6. # In my case the initial branch is named `inicioClaseHerencia`
  7. # And all dependent branches are named `punto1-...` to `punto#-...`, so they can be find with a pattern.
  8.  
  9. old=inicioClaseHerencia
  10. for b in `gb --list "punto*"`; do
  11. gco $b;
  12. git rebase $old
  13. old=$b
  14. done
  15.  
  16. git push --all -f
Add Comment
Please, Sign In to add comment