summaryrefslogtreecommitdiff
path: root/make/git.mk
blob: 2c8c8274a496e33b3ffd6ca6b3419c7f18795377 (plain)
  1. # main local branch (the one we want checked out)
  2. master = master
  3. # all local branches (including those needed by child clones)
  4. branches = $(master)
  5. # local name of origin
  6. origin = origin
  7. allbranches = $(sort $(master) $(branches))
  8. currentbranch := $(shell git branch | grep ^\* | awk '{ print $2 }')
  9. noncurrentbranches := $(filter-out $(currentbranch),$(branches))
  10. #originbranches := $(shell git branch -r | perl -ne 'm,^.\s+'"$$origin"'/([a-z_]\S+)$, && print "$$1\n"' )
  11. localbranches := $(shell git branch | perl -ne 'm,^.\s+([a-z_]\S+)$$, && print "$$1\n"' )
  12. update:
  13. git fetch $(origin)
  14. for branch in $(filter-out $(localbranches),$(allbranches)); do \
  15. git branch $$branch $(origin)/$$branch; \
  16. done
  17. for branch in $(noncurrentbranches); do \
  18. git checkout $$branch; \
  19. git pull $(origin); \
  20. done
  21. git checkout $(master)
  22. git pull $(origin)
  23. init:
  24. git init
  25. git remote add -f -m "$(master)" origin "$(origin)"
  26. git merge origin
  27. # git config remote.origin.push +"refs/heads/$(master)":"refs/heads/$(master)"
  28. .PHONY: update init
class='right'>0
-rw-r--r--tags/88/f3/20150522102417.4391.43011@bastian.jones.dk/signed0
-rw-r--r--tags/88/f3/20170111181250.6ouolnba2utoa6zc@agmartin.aq.upm.es/debian0
-rw-r--r--tags/88/f3/20170111181250.6ouolnba2utoa6zc@agmartin.aq.upm.es/inbox0
-rw-r--r--tags/88/f3/20170111181250.6ouolnba2utoa6zc@agmartin.aq.upm.es/old0
-rw-r--r--tags/88/f3/20171217040002.ADBC385A9@lxp5.free-owl.de/sys0
-rw-r--r--tags/88/f3/20171217040002.ADBC385A9@lxp5.free-owl.de/unread0
-rw-r--r--tags/88/f3/20190422210017.46B85114@jawa.homebase.dk/hb0
-rw-r--r--tags/88/f3/20190422210017.46B85114@jawa.homebase.dk/sys0
-rw-r--r--tags/88/f3/20190422210017.46B85114@jawa.homebase.dk/unread0
-rw-r--r--tags/88/f3/5DD45052-D467-4302-91AF-348C968FAD5F@kaospilot.dk/hb0
-rw-r--r--tags/88/f3/5DD45052-D467-4302-91AF-348C968FAD5F@kaospilot.dk/unread0
-rw-r--r--tags/88/f3/821207978.1274018.1630377024612.JavaMail.app@ltx1-app69520.prod.linkedin.com/unread0
-rw-r--r--tags/88/f3/CAFvW-XfPoOTO3JnrfhwC76sY__3KQYMxiSua8i0OL=Hb_f6dYQ@mail.gmail.com/inbox0
-rw-r--r--tags/88/f3/CAFvW-XfPoOTO3JnrfhwC76sY__3KQYMxiSua8i0OL=Hb_f6dYQ@mail.gmail.com/killed0
-rw-r--r--tags/88/f3/CAFvW-XfPoOTO3JnrfhwC76sY__3KQYMxiSua8i0OL=Hb_f6dYQ@mail.gmail.com/unread0
-rw-r--r--tags/88/f3/E1nu62L-0002oX-B7@respighi.debian.org/debian0
-rw-r--r--tags/88/f3/E1nu62L-0002oX-B7@respighi.debian.org/inbox0
-rw-r--r--tags/88/f3/E1nu62L-0002oX-B7@respighi.debian.org/killed0
-rw-r--r--tags/88/f3/E1nu62L-0002oX-B7@respighi.debian.org/unread0
-rw-r--r--tags/88/f3/b453b59b0808120738g5784ded6gc4815ff803a15d4b@mail.gmail.com/debian0
31 files changed, 0 insertions, 0 deletions