-
Notifications
You must be signed in to change notification settings - Fork 14
Committing to SVN
abhikp edited this page Sep 15, 2011
·
2 revisions
Any local commits you have will need to be pushed to SVN. Before you push you'll need to sync up with svn (see Getting commits from SVN). We'l start from the end of that tutorial:
```
% git log
commit f8633f7a19557cd247d86c97a1423ec36e88d955
Author: Abhik Pramanik <abhik@alum.berkeley.edu>
Date: Wed Sep 14 22:23:23 2011 -0700
Adding a line to INSTALL through git.
commit 28679ab20612e662cefab79e5e43b45dd6f45ffa
Author: abhik@branchout.com <abhik@branchout.com@ba991f9a-d5de-4771-8651-3090c57d9f48>
Date: Thu Sep 15 14:54:21 2011 +0000
Adding BLAH
git-svn-id: https://pl3.projectlocker.com/BranchOut/SvnTestRepo/svn/trunk@13 ba991f9a-
commit 03a360e771110927da699ba346acc53fd5c0f105
Author: abhik@branchout.com <abhik@branchout.com@ba991f9a-d5de-4771-8651-3090c57d9f48>
Date: Thu Sep 15 05:19:46 2011 +0000
Adding another line to INSTALL
git-svn-id: https://pl3.projectlocker.com/BranchOut/SvnTestRepo/svn/trunk@12 ba991f9a-
commit 2d4404df0fad2827c86caf184d83593a6d5e27a6
Author: abhik@branchout.com <abhik@branchout.com@ba991f9a-d5de-4771-8651-3090c57d9f48>
Date: Thu Sep 15 05:15:59 2011 +0000
Adding 'SVN Addition' to INSTALL
git-svn-id: https://pl3.projectlocker.com/BranchOut/SvnTestRepo/svn/trunk@11 ba991f9a-
commit 66500b52d874100ad83f09bb720d19b0fbcacf0c
Author: abhik@branchout.com <abhik@branchout.com@ba991f9a-d5de-4771-8651-3090c57d9f48>
Date: Thu Sep 15 05:11:47 2011 +0000
Adding 'SVN Addition' to INSTALL
git-svn-id: https://pl3.projectlocker.com/BranchOut/SvnTestRepo/svn/trunk@10 ba991f9a-
```
-
So we have a local commit at the top of our log, lets push it to svn using
git svn dcommit.% git svn dcommit Committing to https://pl3.projectlocker.com/BranchOut/SvnTestRepo/svn/trunk ... M INSTALL Committed r14 M INSTALL r14 = 541cbcdedffaf2176baf8f5776763b60892d6d17 (refs/remotes/trunk) No changes between current HEAD and refs/remotes/trunk Resetting to the latest refs/remotes/trunk
In svn if we do an update:
```
% svn log INSTALL
------------------------------------------------------------------------
r13 | abhik@branchout.com | 2011-09-15 07:54:21 -0700 (Thu, 15 Sep 2011) | 1 line
Adding BLAH
------------------------------------------------------------------------
r12 | abhik@branchout.com | 2011-09-14 22:19:46 -0700 (Wed, 14 Sep 2011) | 1 line
Adding another line to INSTALL
------------------------------------------------------------------------
r11 | abhik@branchout.com | 2011-09-14 22:15:59 -0700 (Wed, 14 Sep 2011) | 1 line
Adding 'SVN Addition' to INSTALL
...
% svn update
U INSTALL
Updated to revision 14.
~/Projects/branchout/svn-test
% svn log
------------------------------------------------------------------------
r14 | abhik@branchout.com | 2011-09-15 08:44:29 -0700 (Thu, 15 Sep 2011) | 1 line
Adding a line to INSTALL through git.
------------------------------------------------------------------------
r13 | abhik@branchout.com | 2011-09-15 07:54:21 -0700 (Thu, 15 Sep 2011) | 1 line
Adding BLAH
------------------------------------------------------------------------
r12 | abhik@branchout.com | 2011-09-14 22:19:46 -0700 (Wed, 14 Sep 2011) | 1 line
Adding another line to INSTALL
------------------------------------------------------------------------
r11 | abhik@branchout.com | 2011-09-14 22:15:59 -0700 (Wed, 14 Sep 2011) | 1 line
Adding 'SVN Addition' to INSTALL
...
```