Git : Git-SVN का प्रयोग करें2024/07/24 |
मामले के लिए Subversion रिपॉजिटरी का उपयोग सर्वर साइड पर किया जाता है, Git-SVN के साथ Git वर्किंग रिपॉजिटरी से उनका उपयोग करना संभव है। |
|
[1] | क्लाइंट साइड पर Git-SVN इंस्टॉल करें। |
root@node01:~# apt -y install git-svn
|
[2] | इस उदाहरण पर, यह इस पर आधारित है कि [svnserve] Subversion सर्वर होस्ट पर चल रहा है। (अनिवार्य आवश्यकताएं नहीं) Subversion सर्वर [dlp.srv.world] पर [/var/svn/repos/project] रिपॉजिटरी तक भी पहुंच। |
# SVN भंडार से [git svn ***] के साथ क्लोन करें noble@node01:~/work$ git svn clone --username ubuntu svn://dlp.srv.world/repos/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/noble/work/project/.git/ Authentication realm: <svn://dlp.srv.world:3690> 84792bc8-15d0-4409-8573-be73eacd8478 Password for 'ubuntu': W: +empty_dir: trunk r1 = d8797dc84cafb54d37e6d80ceffb2916d0e19291 (refs/remotes/git-svn) W: +empty_dir: branches r2 = c44caa26838323b5d3e8a271a1661bfdc8ed8d35 (refs/remotes/git-svn) W: +empty_dir: tags r3 = 9b7f6c15993a17b19782fcc331f7e134e192bd6a (refs/remotes/git-svn) A trunk/index.html r4 = e6afeff3c0f0d20140a234fe6794aeb47a70a36a (refs/remotes/git-svn) M trunk/index.html r5 = 39d1b89614de6265dbe6321adbfcf52e01d136f3 (refs/remotes/git-svn) M trunk/index.html r6 = 3145148cd539f4138d04dbce7095079dbc163334 (refs/remotes/git-svn) Checked out HEAD: svn://dlp.srv.world/repos/project r6 creating empty directory: branches creating empty directory: tagsnoble@node01:~/work$ total 12 drwxrwxr-x 3 noble noble 4096 Jul 24 04:28 ./ drwxr-x--- 5 noble noble 4096 Jul 24 04:00 ../ drwxrwxr-x 6 noble noble 4096 Jul 24 04:28 project/noble@node01:~/work$ cd project/trunk noble@node01:~/work/project/trunk$ total 12 drwxrwxr-x 2 noble noble 4096 Jul 24 04:28 ./ drwxrwxr-x 6 noble noble 4096 Jul 24 04:28 ../ -rw-rw-r-- 1 noble noble 37 Jul 24 04:28 index.html # [commit] अद्यतन फ़ाइल noble@node01:~/work/project/trunk$ echo "test file" >> index.html noble@node01:~/work/project/trunk$ git commit index.html -m "update" [master 1a482e3] update 1 file changed, 1 insertion(+) # [push] पर, [dcommit] निर्दिष्ट करें noble@node01:~/work/project/trunk$ git svn dcommit Committing to svn://dlp.srv.world/repos/project ... Authentication realm: <svn://dlp.srv.world:3690> 84792bc8-15d0-4409-8573-be73eacd8478 Password for 'ubuntu': M trunk/index.html Committed r7 M trunk/index.html r7 = 1e18f82772e3540c0828c24f933765dbdc15ab56 (refs/remotes/git-svn) No changes between 1a482e305e2f1d99d555ec351cd3b1a8295841cd and refs/remotes/git-svn Resetting to the latest refs/remotes/git-svn # दूसरों के नवीनतम अपडेट को अपने स्थानीय कार्यशील भंडार में मर्ज करने के लिए, [rebase] निर्दिष्ट करें noble@node01:~/work/project/trunk$ git svn rebase Authentication realm: <svn://dlp.srv.world:3690> 84792bc8-15d0-4409-8573-be73eacd8478 Password for 'ubuntu': M trunk/index.html r8 = a6a06c30b42bc3b3543cc0206196297644fcf2b0 (refs/remotes/git-svn) Successfully rebased and updated refs/heads/master. |
Sponsored Link |
|