brians | aede41c | 2013-02-18 04:41:19 +0000 | [diff] [blame] | 1 | Some us are using git for managing quickly changing code. This file has |
| 2 | directions/notes for setting that up. |
| 3 | |
| 4 | [Cloning] |
| 5 | `git clone \ |
| 6 | ssh://username@robotics.mvla.net/www/https/git/frc971/somebody/2013.git` |
| 7 | where username is your login on the server and somebody is whoever's git |
| 8 | repo you want to clone |
| 9 | |
| 10 | [Adding Other People's Repositories] |
| 11 | `git remote add somebody \ |
| 12 | ssh://username@robotics.mvla.net/www.https/git/frc971/somebody/2013.git` |
| 13 | where username is your login on the server and somebody is another person's |
| 14 | git repository |
| 15 | |
brians | ae54f07 | 2013-02-18 05:24:06 +0000 | [diff] [blame] | 16 | [Working with Other People's Repositories] |
| 17 | `git fetch somebody` will pull their changes, and then you can rebase on top of |
| 18 | them etc. |
| 19 | `git push --mirror` will push all of your local branches so that everybody else |
| 20 | can see them. |
brians | 66d5730 | 2013-02-18 05:10:42 +0000 | [diff] [blame] | 21 | |
brians | aede41c | 2013-02-18 04:41:19 +0000 | [diff] [blame] | 22 | [Synchronizing with SVN] |
| 23 | In order to synchronize the git commits with svn, somebody has to get git-svn |
| 24 | set up in their local git repo and then push/pull commits. |
| 25 | To do that, `git svn init https://robotics.mvla.net/svn/frc971/2013/trunk/src` |
| 26 | Then, unless you want git-svn to pull down everything from SVN again, you have |
| 27 | to do `vim .git/refs/remotes/git-svn` (or whatever you name the remote) and |
| 28 | put in the commit ID of the latest commit in the repository that's from SVN. |
brians | ae54f07 | 2013-02-18 05:24:06 +0000 | [diff] [blame] | 29 | After doing that (and a `git svn fetch`), git-svn works like usual. |
| 30 | To pull changes from svn, do `git-svn fetch`. To push changes to svn, do |
| 31 | `git svn dcommit`, which will take all of your git commits between the |
| 32 | latest commit from svn and your HEAD and make them into svn commits. |
| 33 | Multiple people dealing with svn works out because the git commit IDs end up |
| 34 | the same, so they all just become the same. |