| Some of us are using git for managing quickly changing code. This file has |
| notes for setting that up. |
| |
| [Cloning] |
| `git clone \ |
| ssh://USERNAME@robotics.mvla.net/www/https/git/frc971/SOMEBODY/2014.git` |
| where USERNAME is your login on the server and SOMEBODY is whoever's git |
| repo you want to clone |
| If you don't have a login on the server, then cloning |
| https://robotics.mvla.net/git/frc971/somebody/2014.git instead should work |
| (with your SVN username and password). However, that form of URL is read- |
| only. In order for this to work, you have to either set the environment |
| variable GIT_SSL_NO_VERIFY to 1 or set the git option http.sslverify to false. |
| If you get an error like the one below, install a newer version of git. |
| Unable to find 8fcd87533b76ca5b4b83fb6031ddf0de5e03eb57 under https://robotics.mvla.net/git/frc971/brian/2013.git |
| Cannot obtain needed object 8fcd87533b76ca5b4b83fb6031ddf0de5e03eb57 |
| error: Fetch failed. |
| I get this error sometimes with version 1.7.2.5 but not with version 1.7.10.4. |
| |
| [Adding Other People's Repositories] |
| `git remote add SOMEBODY \ |
| ssh://USERNAME@robotics.mvla.net/www/https/git/frc971/SOMEBODY/2014.git` |
| where USERNAME is your login on the server and SOMEBODY is another person's |
| git repository |
| The https:// URL discussed above in [Cloning] will work too. |
| |
| [Working with Other People's Repositories] |
| `git fetch SOMEBODY` will pull their changes, and then you can rebase on top of |
| them, merge them in, etc. |
| `git push --mirror` will push all of your local branches so that everybody else |
| can see them. (This is the default if the configuration option remote.<remote>.mirror is set.) |
| However, you can not do that with an https:// URL. |
| |
| [Synchronizing with SVN] |
| Somebody should occasionally copy all of the files from git (bbb_cape, |
| frc971, and aos) into svn. |
| |
| [Server Setup] |
| You need a place to store your files. You will need an adminstrator to |
| create a folder for you in /www/https/git/frc971 (on the server) with the |
| correct permissions and group. |
| |
| [Repository Setup] |
| To create a git repository on the server, |
| `git init --bare 2014.git` in your folder (ie |
| "/www/https/git/frc971/USERNAME/"), `cd 2014.git`, |
| `git config --local gc.pruneExpire never`, `rm -r objects/`, and then |
| `ln -s /www/https/git/frc971/objects/2014 objects`. That will set you up |
| with a repository in the standard location and make it so all of the objects |
| in it won't be duplicated with the identical ones in everybody else's |
| repositories. |
| In order for https:// access to work, you have to make sure to rename |
| .git/hooks/post-update.sample to .git/hooks/post-update (and then run |
| `git update-server-info` if you're not going to push immediately). |
| |
| To learn more about git, see git(1) (`man git` or |
| <http://manpages.debian.net/cgi-bin/man.cgi?query=git>) (especially the NOTES |
| section). |