Git : Use Git-SVN2021/06/18 |
For the case Subversion repositories are used on Server Side,
it's possible 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]. |
# clone with [git svn ***] from SVN repository [redhat@node01 work]$ git svn clone --username cent svn://dlp.srv.world/repos/project Initialized empty Git repository in /home/redhat/work/project/.git/ Authentication realm: <svn://dlp.srv.world:3690> 09a8137a-ff45-4285-b3cb-806282b70600 Password for 'cent': W: +empty_dir: trunk r1 = 7aa41618bb867e3ec01209303e607adc0e4f22ec (refs/remotes/git-svn) W: +empty_dir: branches r2 = 3c53baef4ff72b4ca5047c1a957978f71b2c573d (refs/remotes/git-svn) W: +empty_dir: tags r3 = 5e1d56e9d4f03a7ffffd81956e93b436e419e268 (refs/remotes/git-svn) A trunk/testfile.txt r4 = fadd3f2e6ef257cac63bf2e24ac70b5db719ea66 (refs/remotes/git-svn) A trunk/test.txt r5 = d00a6edb62a9023fd14dd2e6c9cb22a5bd103845 (refs/remotes/git-svn) A trunk/index.html r6 = 141d0f8360574b5ab9cef8cb641a5c5b2f03f843 (refs/remotes/git-svn) M trunk/index.html r7 = 945dea8f9dfdf6d4c096ba180d971dcbde63aee0 (refs/remotes/git-svn) M trunk/index.html r8 = 57c85479ed457a4ce6da3fd3caadd0ff33ef686f (refs/remotes/git-svn) Checked out HEAD: svn://dlp.srv.world/repos/project r8 creating empty directory: branches creating empty directory: tags[redhat@node01 work]$ total 0 drwxrwxr-x. 6 redhat redhat 59 Jun 18 00:38 project[redhat@node01 work]$ cd project/trunk [redhat@node01 trunk]$ total 12 -rw-rw-r--. 1 redhat redhat 28 Jun 18 00:38 index.html -rw-rw-r--. 1 redhat redhat 10 Jun 18 00:38 testfile.txt -rw-rw-r--. 1 redhat redhat 10 Jun 18 00:38 test.txt # [commit] updated file [redhat@node01 trunk]$ echo "test file" >> testfile.txt [redhat@node01 trunk]$ git commit testfile.txt -m "update" [master 410626f] update 1 file changed, 1 insertion(+) # to [push], specify [dcommit] [redhat@node01 trunk]$ git svn dcommit Committing to svn://dlp.srv.world/repos/project ... M trunk/testfile.txt Committed r9 M trunk/testfile.txt r9 = fb07d27722a78f87253ec294f2ae2ca0edd9944d (refs/remotes/git-svn) No changes between 410626f7cad3e7b7f02856cf3b5a2de833cc7552 and refs/remotes/git-svn Resetting to the latest refs/remotes/git-svn # to merge the latest updates by others to your local working repository, specify [rebase] [redhat@node01 trunk]$ git svn rebase M trunk/index.html r11 = 2b2b5566059d3c55de58ee32a2ceff4cc3bd717a (refs/remotes/git-svn) Successfully rebased and updated refs/heads/master. |
Sponsored Link |
|