CentOS 8
Sponsored Link

Git : Use Git-SVN
For the case Subversion repositories are used on Server Side, it's possbile to use them from Git working repositories with Git-SVN.
[1] Install Git-SVN on Client Side.
[root@node01 ~]#
dnf -y install git-svn
[2] On this example, it is based on that [svnserve] is running on Subversion Server Host. (not mandatory requirements)
Also Access to [/var/svn/repos/project] repository on Subversion Server [dlp.srv.world].
[cent@node01 ~]$
mkdir work

[cent@node01 ~]$
cd work
# clone with [git svn ***] from SVN repository

[cent@node01 work]$
git svn clone --username cent svn://dlp.srv.world/repos/project

Initialized empty Git repository in /home/cent/work/project/.git/
Authentication realm: <svn://dlp.srv.world:3690> 0d78ea60-6d84-4447-858a-1d77fd5dded5
Password for 'cent':
W: +empty_dir: trunk
r1 = 4c98fe42509135f23604ca6206714596991b7cfd (refs/remotes/git-svn)
W: +empty_dir: branches
r2 = 2eeb5d025edd98fb7fe5bb4b00e343e7b771139b (refs/remotes/git-svn)
W: +empty_dir: tags
r3 = 8108481a566bb6b7c300d3ef2ab2fbfd3b2bf60d (refs/remotes/git-svn)
        A       trunk/testfile1.txt
        A       trunk/testfile2.txt
r4 = ecf30990516b9488cf929710e4a3da58b522e61c (refs/remotes/git-svn)
        M       trunk/testfile1.txt
r5 = 84a823d2d5a8aa3b3dd7159c5da1df2462b76d9a (refs/remotes/git-svn)
        M       trunk/testfile2.txt
r6 = afd471ef143b9a1d6bf4c5f572e56a1f350edf45 (refs/remotes/git-svn)
Checked out HEAD:
  svn://dlp.srv.world/repos/project r6
creating empty directory: branches
creating empty directory: tags

[cent@node01 work]$
total 0
drwxrwxr-x. 6 cent cent 59 Apr 14 21:23 project

[cent@node01 work]$
cd project/trunk

[cent@node01 trunk]$
total 8
-rw-rw-r--. 1 cent cent 14 Apr 15 13:23 testfile1.txt
-rw-rw-r--. 1 cent cent 34 Apr 15 13:23 testfile2.txt

# [commit] updated file

[cent@node01 trunk]$
git commit testfile1.txt -m "update"

[master 6185660] update
 1 file changed, 1 insertion(+)

# to [push], specify [dcommit]

[cent@node01 trunk]$
git svn dcommit

Committing to svn://dlp.srv.world/repos/project ...
        M       trunk/testfile1.txt
Committed r9
        M       trunk/testfile1.txt
r9 = 268ccc43af32a76612a8eaa6d7c0bfd51e3f6895 (refs/remotes/git-svn)
No changes between 6185660a896a2bdeda6fc3be9fe1a91183302fe2 and refs/remotes/git-svn
Resetting to the latest refs/remotes/git-svn

# to merge latest updates by others to your local working repository, specify [rebase]

[cent@node01 trunk]$
git svn rebase

        M       trunk/testfile1.txt
r9 = 268ccc43af32a76612a8eaa6d7c0bfd51e3f6895 (refs/remotes/git-svn)
        M       trunk/testfile2.txt
r10 = 7a0f7870bdcf74262f30e72e689b77df36567421 (refs/remotes/git-svn)
        M       trunk/testfile2.txt
r11 = dafe83cc16306565147cc09fc09941fffb038081 (refs/remotes/git-svn)
First, rewinding head to replay your work on top of it...
Fast-forwarded master to refs/remotes/git-svn.
Matched Content