-
Notifications
You must be signed in to change notification settings - Fork 1
Raspi configuration for remote repos
Paul Ambrose edited this page Feb 21, 2017
·
2 revisions
Setup a bare repo and a source directory:
$ cd ~/git
$ mkdir FRC-2017
$ mkdir FRC-2017.git
$ git init --bare ~/git/FRC-2017.git
Edit FRC-2017.git/hooks/post-receive and put this into it:
#!/usr/bin/env sh
git --work-tree=/home/pi/git/FRC-2017 --git-dir=/home/pi/git/FRC-2017.git checkout -f
echo "*** Updated FRC-2017 ***" >&2
Make post-receive executable:
$ chmod +x ~/gitFRC-2017.git/hooks/post-receive
Adjust the git config on your Mac (change raspiXX to your raspi hostname):
$ cd ~/git/FRC-2017
$ git remote add raspiXX pi@raspiXX.local:/home/pi/git/FRC-2017.git
Push to the Raspi:
$ git push raspiXX master
Setup a bare repo and a source directory:
$ cd ~/git
$ mkdir common-robotics
$ mkdir common-robotics.git
$ git init --bare ~/git/common-robotics.git
Edit common-robotics.git/hooks/post-receive and put this into it:
#!/usr/bin/env sh
git --work-tree=/home/pi/git/common-robotics --git-dir=/home/pi/git/common-robotics.git checkout -f
echo "*** Updated common-robotics.git ***" >&2
Make post-receive executable:
$ chmod +x ~/git/common-robotics.git/hooks/post-receive
Adjust the git config on your Mac (change raspiXX to your raspi hostname):
$ cd ~/git/common-robotics
$ git remote add raspiXX pi@raspiXX.local:/home/pi/git/common-robotics.git
Push to the Raspi:
$ cd ~/git/common-robotics
$ git push raspiXX master
Setup a bare repo and a source directory:
$ cd ~/git
$ mkdir object-tracking
$ mkdir object-tracking.git
$ git init --bare ~/git/object-tracking.git
Edit object-tracking.git/hooks/post-receive and put this into it:
#!/usr/bin/env sh
git --work-tree=/home/pi/git/object-tracking --git-dir=/home/pi/git/object-tracking.git checkout -f
echo "*** Updated object-tracking.git ***" >&2
Make post-receive executable:
$ chmod +x ~/git/object-tracking.git/hooks/post-receive
Adjust the git config on your Mac (change raspiXX to your raspi hostname):
$ cd ~/git/object-tracking
$ git remote add raspiXX pi@raspiXX.local:/home/pi/git/object-tracking.git
Push to the Raspi:
$ cd ~/git/object-tracking
$ git push raspiXX master