# main local branch (the one we want checked out) master = master # all local branches (including those needed by child clones) branches = $(master) # local name of origin origin = origin allbranches = $(sort $(master) $(branches)) currentbranch := $(shell git branch | grep ^\* | awk '{ print $2 }') noncurrentbranches := $(filter-out $(currentbranch),$(branches)) #originbranches := $(shell git branch -r | perl -ne 'm,^.\s+'"$$origin"'/([a-z_]\S+)$, && print "$$1\n"' ) localbranches := $(shell git branch | perl -ne 'm,^.\s+([a-z_]\S+)$$, && print "$$1\n"' ) update: git fetch $(origin) for branch in $(filter-out $(localbranches),$(allbranches)); do \ git branch $$branch $(origin)/$$branch; \ done for branch in $(noncurrentbranches); do \ git checkout $$branch; \ git pull $(origin); \ done git checkout $(master) git pull $(origin) init: git init git remote add -f -m "$(master)" origin "$(origin)" git merge origin # git config remote.origin.push +"refs/heads/$(master)":"refs/heads/$(master)" .PHONY: update init ect> Unnamed repository; edit this file 'description' to name the repository.Jonas Smedegaard
summaryrefslogtreecommitdiff
path: root/tags/57/94/20191120133426.188895b1bc22ce1c02b3a9cd@iijmio-mail.jp/unread
diff options
context:
space:
mode:
Diffstat (limited to 'tags/57/94/20191120133426.188895b1bc22ce1c02b3a9cd@iijmio-mail.jp/unread')
-rw-r--r--tags/57/94/20191120133426.188895b1bc22ce1c02b3a9cd@iijmio-mail.jp/unread0
1 files changed, 0 insertions, 0 deletions