improve Makefile.git
improve Makefile.git

Change the example Makefile.git as suggested in #895
  abort when a patch fails to apply
  fix build with GNU Make 4.0
  reset git to the specified version instead of checking out a detached head

AnonMall/RIOT,chris-wood/RIOT,mfrey/RIOT,MonsterCode8000/RIOT,latsku/RIOT,EmuxEvans/RIOT,binarylemon/RIOT,rakendrathapa/RIOT,neiljay/RIOT,A-Paul/RIOT,MarkXYang/RIOT,Darredevil/RIOT,RIOT-OS/RIOT,adrianghc/RIOT,katezilla/RIOT,BytesGalore/RIOT,1blankz7/RIOT,haoyangyu/RIOT,rakendrathapa/RIOT,LudwigKnuepfer/RIOT,emmanuelsearch/RIOT,ThanhVic/RIOT,Yonezawa-T2/RIOT,rfuentess/RIOT,kb2ma/RIOT,rakendrathapa/RIOT,TobiasFredersdorf/RIOT,gautric/RIOT,marcosalm/RIOT,changbiao/RIOT,Ell-i/RIOT,tdautc19841202/RIOT,jremmert-phytec-iot/RIOT,FrancescoErmini/RIOT,RIOT-OS/RIOT,wentaoshang/RIOT,smlng/RIOT,OTAkeys/RIOT,jhollister/RIOT,jhollister/RIOT,jasonatran/RIOT,sumanpanchal/RIOT,centurysys/RIOT,RBartz/RIOT,rfswarm/RIOT,RubikonAlpha/RIOT,ks156/RIOT,syin2/RIOT,plushvoxel/RIOT,latsku/RIOT,aeneby/RIOT,openkosmosorg/RIOT,JensErdmann/RIOT,rfswarm/RIOT,msolters/RIOT,jremmert-phytec-iot/RIOT,mtausig/RIOT,BytesGalore/PetersRIOT,sgso/RIOT,thiagohd/RIOT,abp719/RIOT,watr-li/RIOT,brettswann/RIOT,robixnai/RIOT,mfrey/RIOT,automote/RIOT,miri64/RIOT,kbumsik/RIOT,abkam07/RIOT,openkosmosorg/RIOT,mziegert/RIOT,robixnai/RIOT,ros2/ros2_embedded_riot,avmelnikoff/RIOT,dhruvvyas90/RIOT,cladmi/RIOT,Hyungsin/RIOT-OS,RBartz/RIOT,mziegert/RIOT,dailab/RIOT,rajma996/RIOT,tdautc19841202/RIOT,toonst/RIOT,kb2ma/RIOT,MarkXYang/RIOT,basilfx/RIOT,neumodisch/RIOT,locicontrols/RIOT,neumodisch/RIOT,dhruvvyas90/RIOT,ros2/ros2_embedded_riot,arvindpdmn/RIOT,katezilla/RIOT,josephnoir/RIOT,dhruvvyas90/RIOT,robixnai/RIOT,kYc0o/RIOT,herrfz/RIOT,wentaoshang/RIOT,dailab/RIOT,luciotorre/RIOT,neumodisch/RIOT,sgso/RIOT,asanka-code/RIOT,MonsterCode8000/RIOT,robixnai/RIOT,x3ro/RIOT,rfuentess/RIOT,RIOT-OS/RIOT,gbarnett/RIOT,zhuoshuguo/RIOT,LudwigOrtmann/RIOT,Yonezawa-T2/RIOT,dailab/RIOT,lazytech-org/RIOT,OlegHahm/RIOT,luciotorre/RIOT,mziegert/RIOT,bartfaizoltan/RIOT,thomaseichinger/RIOT,neumodisch/RIOT,altairpearl/RIOT,changbiao/RIOT,asanka-code/RIOT,thomaseichinger/RIOT,smlng/RIOT,syin2/RIOT,katezilla/RIOT,FrancescoErmini/RIOT,centurysys/RIOT,josephnoir/RIOT,kbumsik/RIOT,MonsterCode8000/RIOT,kerneltask/RIOT,lazytech-org/RIOT,jremmert-phytec-iot/RIOT,ximus/RIOT,RubikonAlpha/RIOT,koenning/RIOT,Osblouf/RIOT,spium/IoT-RIOT,Josar/RIOT,attdona/RIOT,kushalsingh007/RIOT,A-Paul/RIOT,alex1818/RIOT,miri64/RIOT,AnonMall/RIOT,jremmert-phytec-iot/RIOT,biboc/RIOT,DipSwitch/RIOT,Lexandro92/RIOT-CoAP,herrfz/RIOT,arvindpdmn/RIOT,aeneby/RIOT,MohmadAyman/RIOT,alignan/RIOT,yogo1212/RIOT,ximus/RIOT,khhhh/RIOT,hamilton-mote/RIOT-OS,kaleb-himes/RIOT,patkan/RIOT,kaspar030/RIOT,marcosalm/RIOT,mfrey/RIOT,benoit-canet/RIOT,luciotorre/RIOT,LudwigOrtmann/RIOT,dhruvvyas90/RIOT,attdona/RIOT,roberthartung/RIOT,watr-li/RIOT,Darredevil/RIOT,miri64/RIOT,EmuxEvans/RIOT,openkosmosorg/RIOT,adrianghc/RIOT,gebart/RIOT,rousselk/RIOT,OlegHahm/RIOT,abkam07/RIOT,miri64/RIOT,plushvoxel/RIOT,emmanuelsearch/RIOT,kushalsingh007/RIOT,Lexandro92/RIOT-CoAP,cladmi/RIOT,changbiao/RIOT,RubikonAlpha/RIOT,abkam07/RIOT,dkm/RIOT,d00616/RIOT,spium/IoT-RIOT,avmelnikoff/RIOT,Lotterleben/RIOT,BytesGalore/PetersRIOT,immesys/RiSyn,changbiao/RIOT,lazytech-org/RIOT,Osblouf/RIOT,jbeyerstedt/RIOT-OTA-update,haoyangyu/RIOT,PSHIVANI/Riot-Code,plushvoxel/RIOT,gbarnett/RIOT,asanka-code/RIOT,kerneltask/RIOT,jferreir/RIOT,PSHIVANI/Riot-Code,attdona/RIOT,jferreir/RIOT,aeneby/RIOT,l3nko/RIOT,thomaseichinger/RIOT,Lotterleben/RIOT,mtausig/RIOT,Lexandro92/RIOT-CoAP,beurdouche/RIOT,automote/RIOT,RIOT-OS/RIOT,jferreir/RIOT,kerneltask/RIOT,neumodisch/RIOT,binarylemon/RIOT,malosek/RIOT,BytesGalore/PetersRIOT,bartfaizoltan/RIOT,mtausig/RIOT,wentaoshang/RIOT,Hyungsin/RIOT-OS,tfar/RIOT,ThanhVic/RIOT,Josar/RIOT,sgso/RIOT,kaleb-himes/RIOT,LudwigOrtmann/RIOT,thiagohd/RIOT,malosek/RIOT,gautric/RIOT,lebrush/RIOT,spium/IoT-RIOT,OlegHahm/RIOT,locicontrols/RIOT,RBartz/RIOT,yogo1212/RIOT,yogo1212/RIOT,fnack/RIOT,nsol-nmsu/RIOT,patkan/RIOT,jhollister/RIOT,jfischer-phytec-iot/RIOT,d00616/RIOT,watr-li/RIOT,brettswann/RIOT,MarkXYang/RIOT,watr-li/RIOT,jbeyerstedt/RIOT-OTA-update,emmanuelsearch/RIOT,ximus/RIOT,alignan/RIOT,adrianghc/RIOT,binarylemon/RIOT,rfswarm/RIOT,Yonezawa-T2/RIOT,JensErdmann/RIOT,arvindpdmn/RIOT,syin2/RIOT,ant9000/RIOT,sgso/RIOT,d00616/RIOT,shady33/RIOT,msolters/RIOT,Lotterleben/RIOT,roberthartung/RIOT,jbeyerstedt/RIOT-OTA-update,kYc0o/RIOT,patkan/RIOT,ntrtrung/RIOT,rfswarm/RIOT,foss-for-synopsys-dwc-arc-processors/RIOT,thomaseichinger/RIOT,avmelnikoff/RIOT,zhuoshuguo/RIOT,ThanhVic/RIOT,emmanuelsearch/RIOT,kerneltask/RIOT,dkm/RIOT,benoit-canet/RIOT,jremmert-phytec-iot/RIOT,patkan/RIOT,Josar/RIOT,aeneby/RIOT,haoyangyu/RIOT,EmuxEvans/RIOT,attdona/RIOT,locicontrols/RIOT,x3ro/RIOT,spium/IoT-RIOT,nsol-nmsu/RIOT,chris-wood/RIOT,dkm/RIOT,brettswann/RIOT,altairpearl/RIOT,beurdouche/RIOT,herrfz/RIOT,koenning/RIOT,phiros/RIOT,tdautc19841202/RIOT,rakendrathapa/RIOT,neiljay/RIOT,Ell-i/RIOT,phiros/RIOT,rousselk/RIOT,koenning/RIOT,marcosalm/RIOT,arvindpdmn/RIOT,1blankz7/RIOT,rfswarm/RIOT,stevenj/RIOT,brettswann/RIOT,OTAkeys/RIOT,jbeyerstedt/RIOT-OTA-update,thiagohd/RIOT,locicontrols/RIOT,kerneltask/RIOT,MohmadAyman/RIOT,MarkXYang/RIOT,biboc/RIOT,l3nko/RIOT,jfischer-phytec-iot/RIOT,TobiasFredersdorf/RIOT,centurysys/RIOT,adrianghc/RIOT,msolters/RIOT,fnack/RIOT,Lotterleben/RIOT,immesys/RiSyn,d00616/RIOT,marcosalm/RIOT,bartfaizoltan/RIOT,foss-for-synopsys-dwc-arc-processors/RIOT,spium/IoT-RIOT,Ell-i/RIOT,chris-wood/RIOT,sgso/RIOT,shady33/RIOT,shady33/RIOT,neiljay/RIOT,changbiao/RIOT,rousselk/RIOT,BytesGalore/PetersRIOT,backenklee/RIOT,biboc/RIOT,AnonMall/RIOT,Osblouf/RIOT,smlng/RIOT,koenning/RIOT,Lexandro92/RIOT-CoAP,Yonezawa-T2/RIOT,openkosmosorg/RIOT,OTAkeys/RIOT,arvindpdmn/RIOT,haoyangyu/RIOT,centurysys/RIOT,automote/RIOT,FrancescoErmini/RIOT,1blankz7/RIOT,alignan/RIOT,herrfz/RIOT-old,changbiao/RIOT,JensErdmann/RIOT,tdautc19841202/RIOT,stevenj/RIOT,benoit-canet/RIOT,toonst/RIOT,gautric/RIOT,adjih/RIOT,herrfz/RIOT-old,cladmi/RIOT,neumodisch/RIOT,luciotorre/RIOT,rousselk/RIOT,malosek/RIOT,FrancescoErmini/RIOT,altairpearl/RIOT,spium/IoT-RIOT,Ell-i/RIOT,locicontrols/RIOT,authmillenon/RIOT,alex1818/RIOT,MohmadAyman/RIOT,beurdouche/RIOT,tfar/RIOT,binarylemon/RIOT,phiros/RIOT,luciotorre/RIOT,ntrtrung/RIOT,rfuentess/RIOT,rfswarm2/RIOT,khhhh/RIOT,attdona/RIOT,LudwigKnuepfer/RIOT,roberthartung/RIOT,khhhh/RIOT,yogo1212/RIOT,marcosalm/RIOT,basilfx/RIOT,herrfz/RIOT-old,binarylemon/RIOT,dailab/RIOT,JensErdmann/RIOT,mfrey/RIOT,ximus/RIOT,herrfz/RIOT,d00616/RIOT,mtausig/RIOT,kbumsik/RIOT,kb2ma/RIOT,emmanuelsearch/RIOT,BytesGalore/RIOT,Hyungsin/RIOT-OS,hamilton-mote/RIOT-OS,rajma996/RIOT,LudwigOrtmann/RIOT,ant9000/RIOT,RBartz/RIOT,nsol-nmsu/RIOT,dhruvvyas90/RIOT,hamilton-mote/RIOT-OS,msolters/RIOT,smlng/RIOT,jhollister/RIOT,adrianghc/RIOT,MonsterCode8000/RIOT,khhhh/RIOT,foss-for-synopsys-dwc-arc-processors/RIOT,kbumsik/RIOT,ros2/ros2_embedded_riot,A-Paul/RIOT,kaspar030/RIOT,kushalsingh007/RIOT,jasonatran/RIOT,latsku/RIOT,haoyangyu/RIOT,rajma996/RIOT,MohmadAyman/RIOT,abp719/RIOT,LudwigOrtmann/RIOT,automote/RIOT,kbumsik/RIOT,dailab/RIOT,robixnai/RIOT,rakendrathapa/RIOT,kYc0o/RIOT,mziegert/RIOT,Josar/RIOT,ks156/RIOT,lazytech-org/RIOT,mtausig/RIOT,mziegert/RIOT,phiros/RIOT,gautric/RIOT,ant9000/RIOT,sumanpanchal/RIOT,rajma996/RIOT,miri64/RIOT,l3nko/RIOT,nsol-nmsu/RIOT,katezilla/RIOT,Lotterleben/RIOT,aeneby/RIOT,fnack/RIOT,RubikonAlpha/RIOT,daniel-k/RIOT,sumanpanchal/RIOT,attdona/RIOT,josephnoir/RIOT,ntrtrung/RIOT,abkam07/RIOT,fnack/RIOT,herrfz/RIOT,asanka-code/RIOT,Osblouf/RIOT,Darredevil/RIOT,Ell-i/RIOT,stevenj/RIOT,ks156/RIOT,FrancescoErmini/RIOT,benoit-canet/RIOT,rajma996/RIOT,syin2/RIOT,A-Paul/RIOT,avmelnikoff/RIOT,wentaoshang/RIOT,zhuoshuguo/RIOT,toonst/RIOT,koenning/RIOT,bartfaizoltan/RIOT,authmillenon/RIOT,kaspar030/RIOT,ros2/ros2_embedded_riot,LudwigKnuepfer/RIOT,benoit-canet/RIOT,wentaoshang/RIOT,biboc/RIOT,AnonMall/RIOT,rakendrathapa/RIOT,authmillenon/RIOT,abp719/RIOT,fnack/RIOT,MohmadAyman/RIOT,MarkXYang/RIOT,ThanhVic/RIOT,Osblouf/RIOT,alex1818/RIOT,AnonMall/RIOT,neiljay/RIOT,Lexandro92/RIOT-CoAP,luciotorre/RIOT,abp719/RIOT,syin2/RIOT,authmillenon/RIOT,marcosalm/RIOT,cladmi/RIOT,stevenj/RIOT,basilfx/RIOT,FrancescoErmini/RIOT,EmuxEvans/RIOT,ximus/RIOT,tdautc19841202/RIOT,malosek/RIOT,ThanhVic/RIOT,gebart/RIOT,authmillenon/RIOT,bartfaizoltan/RIOT,kaleb-himes/RIOT,kushalsingh007/RIOT,toonst/RIOT,phiros/RIOT,jferreir/RIOT,hamilton-mote/RIOT-OS,malosek/RIOT,dkm/RIOT,abkam07/RIOT,BytesGalore/RIOT,josephnoir/RIOT,adjih/RIOT,kushalsingh007/RIOT,shady33/RIOT,sumanpanchal/RIOT,BytesGalore/RIOT,zhuoshuguo/RIOT,Hyungsin/RIOT-OS,ant9000/RIOT,rfuentess/RIOT,DipSwitch/RIOT,adjih/RIOT,stevenj/RIOT,yogo1212/RIOT,basilfx/RIOT,herrfz/RIOT-old,DipSwitch/RIOT,rousselk/RIOT,backenklee/RIOT,jferreir/RIOT,rfswarm/RIOT,katezilla/RIOT,1blankz7/RIOT,lebrush/RIOT,Lotterleben/RIOT,jfischer-phytec-iot/RIOT,abp719/RIOT,daniel-k/RIOT,immesys/RiSyn,ros2/ros2_embedded_riot,centurysys/RIOT,basilfx/RIOT,patkan/RIOT,daniel-k/RIOT,khhhh/RIOT,benoit-canet/RIOT,adjih/RIOT,mziegert/RIOT,immesys/RiSyn,tfar/RIOT,beurdouche/RIOT,rfswarm2/RIOT,mfrey/RIOT,backenklee/RIOT,patkan/RIOT,JensErdmann/RIOT,stevenj/RIOT,LudwigKnuepfer/RIOT,Darredevil/RIOT,plushvoxel/RIOT,chris-wood/RIOT,RBartz/RIOT,PSHIVANI/Riot-Code,centurysys/RIOT,daniel-k/RIOT,gebart/RIOT,dkm/RIOT,beurdouche/RIOT,alex1818/RIOT,foss-for-synopsys-dwc-arc-processors/RIOT,rajma996/RIOT,rfuentess/RIOT,asanka-code/RIOT,tfar/RIOT,roberthartung/RIOT,Darredevil/RIOT,koenning/RIOT,LudwigKnuepfer/RIOT,thiagohd/RIOT,ntrtrung/RIOT,openkosmosorg/RIOT,shady33/RIOT,tfar/RIOT,sgso/RIOT,brettswann/RIOT,AnonMall/RIOT,MohmadAyman/RIOT,BytesGalore/PetersRIOT,gebart/RIOT,MonsterCode8000/RIOT,backenklee/RIOT,MonsterCode8000/RIOT,ks156/RIOT,TobiasFredersdorf/RIOT,automote/RIOT,jasonatran/RIOT,smlng/RIOT,PSHIVANI/Riot-Code,avmelnikoff/RIOT,abkam07/RIOT,zhuoshuguo/RIOT,kb2ma/RIOT,altairpearl/RIOT,Yonezawa-T2/RIOT,hamilton-mote/RIOT-OS,lebrush/RIOT,tdautc19841202/RIOT,phiros/RIOT,khhhh/RIOT,kaleb-himes/RIOT,binarylemon/RIOT,RBartz/RIOT,immesys/RiSyn,Josar/RIOT,x3ro/RIOT,DipSwitch/RIOT,sumanpanchal/RIOT,watr-li/RIOT,gbarnett/RIOT,Lexandro92/RIOT-CoAP,yogo1212/RIOT,foss-for-synopsys-dwc-arc-processors/RIOT,abp719/RIOT,toonst/RIOT,l3nko/RIOT,openkosmosorg/RIOT,rfswarm2/RIOT,gbarnett/RIOT,latsku/RIOT,Osblouf/RIOT,OlegHahm/RIOT,alignan/RIOT,OTAkeys/RIOT,BytesGalore/RIOT,1blankz7/RIOT,l3nko/RIOT,ks156/RIOT,x3ro/RIOT,herrfz/RIOT,dhruvvyas90/RIOT,asanka-code/RIOT,josephnoir/RIOT,d00616/RIOT,jasonatran/RIOT,thomaseichinger/RIOT,JensErdmann/RIOT,x3ro/RIOT,bartfaizoltan/RIOT,1blankz7/RIOT,brettswann/RIOT,msolters/RIOT,jbeyerstedt/RIOT-OTA-update,Lotterleben/RIOT,ros2/ros2_embedded_riot,altairpearl/RIOT,latsku/RIOT,gebart/RIOT,l3nko/RIOT,kaspar030/RIOT,fnack/RIOT,robixnai/RIOT,BytesGalore/PetersRIOT,locicontrols/RIOT,thiagohd/RIOT,alex1818/RIOT,rousselk/RIOT,TobiasFredersdorf/RIOT,altairpearl/RIOT,ntrtrung/RIOT,alignan/RIOT,jferreir/RIOT,shady33/RIOT,msolters/RIOT,adjih/RIOT,immesys/RiSyn,OTAkeys/RIOT,zhuoshuguo/RIOT,jfischer-phytec-iot/RIOT,sumanpanchal/RIOT,rfswarm2/RIOT,gbarnett/RIOT,kaspar030/RIOT,RubikonAlpha/RIOT,PSHIVANI/Riot-Code,Hyungsin/RIOT-OS,malosek/RIOT,jasonatran/RIOT,kb2ma/RIOT,biboc/RIOT,RubikonAlpha/RIOT,roberthartung/RIOT,LudwigOrtmann/RIOT,lebrush/RIOT,ThanhVic/RIOT,arvindpdmn/RIOT,RIOT-OS/RIOT,rfswarm2/RIOT,locicontrols/RIOT,lazytech-org/RIOT,A-Paul/RIOT,kaleb-himes/RIOT,haoyangyu/RIOT,wentaoshang/RIOT,OlegHahm/RIOT,gbarnett/RIOT,chris-wood/RIOT,alex1818/RIOT,kushalsingh007/RIOT,kYc0o/RIOT,EmuxEvans/RIOT,thiagohd/RIOT,MarkXYang/RIOT,Darredevil/RIOT,cladmi/RIOT,jhollister/RIOT,gautric/RIOT,ximus/RIOT,herrfz/RIOT-old,backenklee/RIOT,TobiasFredersdorf/RIOT,emmanuelsearch/RIOT,plushvoxel/RIOT,watr-li/RIOT,latsku/RIOT,automote/RIOT,jhollister/RIOT,PSHIVANI/Riot-Code,ntrtrung/RIOT,kYc0o/RIOT,daniel-k/RIOT,BytesGalore/PetersRIOT,jfischer-phytec-iot/RIOT,ros2/ros2_embedded_riot,rfswarm2/RIOT,EmuxEvans/RIOT,lebrush/RIOT,authmillenon/RIOT,chris-wood/RIOT,ant9000/RIOT,daniel-k/RIOT,DipSwitch/RIOT,Yonezawa-T2/RIOT,jremmert-phytec-iot/RIOT,neiljay/RIOT,DipSwitch/RIOT,lebrush/RIOT,nsol-nmsu/RIOT