Git : Use Git-SVN2026/07/06 |
|
For the case Subversion repositories are used on Server Side, it's possible to use them from Git work3ing repositories with Git-SVN. |
|
| [1] | Install Git-SVN on Client Side. |
|
root@node01:~# apt -y install git-svn
|
| [2] | On this example, it is based on that you can access to Subversion Server Host via HTTP. (not mandatory requirements) Also Access to [/var/svn/repos/project] repository on Subversion Server [dlp.srv.world]. |
|
# clone with [git svn ***] from SVN repository resolute@node01:~/work3$ git svn clone --username ubuntu https://dlp.srv.world/project
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: git branch -m <name>
Initialized empty Git repository in /home/resolute/work3/project/.git/
Authentication realm: <https://dlp.srv.world:443> DAV SVN
Password for 'ubuntu':
W: +empty_dir: trunk
r1 = e799bd18747b57496d6651fd87264ddb444e8cf8 (refs/remotes/git-svn)
W: +empty_dir: branches
r2 = 9756e6265a8c052fd846d61b6df945aad9d9eb7d (refs/remotes/git-svn)
W: +empty_dir: tags
r3 = 217cb13dc71bdddd04c855ce29228dd53be2c233 (refs/remotes/git-svn)
A trunk/index.html
r4 = 7663ea26709c331854367e5376d98863e6f15f2c (refs/remotes/git-svn)
Checked out HEAD:
https://dlp.srv.world/project r4
creating empty directory: branches
creating empty directory: tags
resolute@node01:~/work3$ total 12 drwxrwxr-x 3 resolute resolute 4096 Jul 6 00:50 ./ drwxr-x--- 7 resolute resolute 4096 Jul 6 00:50 ../ drwxrwxr-x 6 resolute resolute 4096 Jul 6 00:50 project/resolute@node01:~/work3$ cd project/trunk resolute@node01:~/work3/project/trunk$ total 12 drwxrwxr-x 2 resolute resolute 4096 Jul 6 00:50 ./ drwxrwxr-x 6 resolute resolute 4096 Jul 6 00:50 ../ -rw-rw-r-- 1 resolute resolute 11 Jul 6 00:50 index.html # [commit] updated file resolute@node01:~/work3/project/trunk$ echo "test file" >> index.html resolute@node01:~/work3/project/trunk$ git commit index.html -m "update" [master a595fb1] update 1 file changed, 1 insertion(+) # to [push], specify [dcommit] resolute@node01:~/work3/project/trunk$ git svn dcommit
Duplicate specification "id|i=s" for option "i"
Committing to https://dlp.srv.world/project ...
Authentication realm: <https://dlp.srv.world:443> DAV SVN
Password for 'ubuntu':
M trunk/index.html
Committed r5
M trunk/index.html
r5 = cde56819eb8eb58024383b79e9eb774eeeb8d6d4 (refs/remotes/git-svn)
No changes between a595fb16cbf69a150fae6dfe87f0213cddd0c041 and refs/remotes/git-svn
Resetting to the latest refs/remotes/git-svn
# to merge the latest updates by others to your local work3ing repository, specify [rebase] resolute@node01:~/work3/project/trunk$ git svn rebase
Authentication realm: <https://dlp.srv.world:443> DAV SVN
Password for 'ubuntu':
M trunk/index.html
r8 = a6a06c30b42bc3b3543cc0206196297644fcf2b0 (refs/remotes/git-svn)
Successfully rebased and updated refs/heads/master.
|
| Sponsored Link |
|
|