Git yog ib qho cuab yeej siv ntau hauv kev tsim software sib koom tes. Hauv cheeb tsam cov chaw khaws cia cloning khaws qhov hloov pauv tshiab kawg rau txoj haujlwm yog li koj tuaj yeem ua haujlwm ntawm nws tus kheej thiab ua koj tus kheej kev kho yam tsis tas cuam tshuam ncaj qha rau kev ua haujlwm ntawm lwm tus. Txhawm rau clone lub chaw cia khoom, koj yuav tsum rub tawm Git lossis Git-txhawb nqa software, nrhiav lub chaw cia khoom uas koj xav tau clone, thiab qhia qhov chaw uas yuav txuag lub cloned repository. Koj tuaj yeem ua qhov no dhau los ntawm kab lus hais kom ua txoj haujlwm lossis siv cov duab siv sib tham (GUI) txhawb nqa txoj haujlwm.
Kauj ruam
Txoj Kev 1 ntawm 3: Siv Kab hais kom ua
Kauj Ruam 1. Rub tawm thiab teeb tsa Git
Mus ntsib https://git-scm.com/downloads thiab xaiv rub tawm raws li lub platform koj tab tom siv.
Kauj Ruam 2. Tsim cov npe chaw cia khoom
Mus rau phau ntawv teev npe uas xav tau ntawm koj lub computer. Txoj cai-nias (lossis Ctrl+nyem) qhov chaw khoob hauv phau ntawv teev npe thiab xaiv "New Folder".
Txhawm rau kom yooj yim, nws yog lub tswv yim zoo los tsim lub chaw cia khoom ua ntej ntawm lub desktop
Kauj Ruam 3. Qhib Git CMD
Txoj haujlwm no los ua ntej nruab nrog Git cov cuab yeej. Txawm li cas los xij, koj tseem tuaj yeem siv qhov kev hais kom ua tam sim no (Windows) lossis Terminal (Mac/Linux) program.
Kauj Ruam 4. Mus ntsib phau ntawv teev npe ntawm kab hais kom ua
Nkag mus rau lo lus txib "cd", ua raws li qhov chaw nyob ntawm cov ntawv khaws cia uas tau tsim. Cov ntawv tais ceev tseg hauv qhov chaw nyob raug cais los ntawm tus cim "\". Nias Enter kom ua tiav qhov kev nqis tes ua.
- Piv txwv li, yog tias koj tsim daim nplaub tshev ntawm lub desktop ntawm lub khoos phis tawj Windows, siv cov lus txib "cd c: / users [username] desktop [foldname]"
- "cd" sawv rau "hloov cov npe" (hloov cov npe).
- Hloov tag nrho ib zaug, koj tuaj yeem hloov cov npe ib los ntawm ib qho yog tias koj pom nws yooj yim dua rau ntaus: "cd desktop" Sau "cd folder name" Enter.
Kauj Ruam 5. Mus ntsib lub chaw khaws khoom hauv lub vev xaib
Nkag mus rau GitHub chaw cia khoom nplooj ntawv (lossis lwm nplooj ntawv Git) uas koj xav tau clone. Qhov chaw khaws cia qhov chaw tau qhia ntawm nplooj ntawv khaws cia.
Txoj haujlwm tseeb ntawm qhov chaw nyob yuav nyob ntawm qhov chaw cia khoom siv, tab sis feem ntau pom nyob rau sab saum toj ntawm nplooj ntawv kom nkag tau yooj yim. Sim nrhiav qhov chaw cia khoom URL ntawm nplooj ntawv
Kauj Ruam 6. Luam qhov chaw nyob
Nyem qhov chaw nyob (feem ntau yog URL pib nrog "https" lossis "ssh") thiab nias qhov luv Ctrl+C lossis Cmd+C kom luam nws.
Kauj Ruam 7. Nkag mus “git clone”, ua raws los ntawm qhov chaw nyob rau hauv kab hais kom ua txoj haujlwm
Qhov "git" hais kom ua kab lus hais kom ua txoj haujlwm uas koj tab tom siv Git muaj nuj nqi, thiab "clone" hais kom ua qhov program kom clone qhov chaw nkag mus tom qab qhov hais kom ua. Muab tshuaj txhuam lossis ntaus qhov chaw nyob tom qab cov lus txib.
Txhawm rau muab qhov URL lossis qhov chaw tso rau hauv Windows Command Prompt, koj yuav tsum tau nyem txoj cai qhov program thiab xaiv "Muab tshuaj txhuam" los ntawm cov ntawv qhia zaub mov. Txawm li cas los xij, nws tsis tas yuav ua raws cov kauj ruam no hauv Terminal ntawm Mac lossis Linux computer
Kauj Ruam 8. Nias Enter qhov tseem ceeb
Cov txheej txheem cloning yuav pib thiab qhov kev nce qib ntawm cov txheej txheem yuav tshwm rau ntawm kab hais kom ua. Koj yuav tau txais kev ceeb toom thaum txheej txheem ua tiav los ntawm cov lus hauv qhov hais kom ua qhov rai.
Txoj Kev 2 ntawm 3: Siv Git GUI
Kauj Ruam 1. Rub tawm thiab teeb tsa Git
Mus ntsib https://git-scm.com/downloads thiab xaiv rub tawm raws li lub platform koj tab tom siv.
Kauj Ruam 2. Tsim cov npe chaw cia khoom
Mus rau phau ntawv teev npe uas xav tau ntawm koj lub computer. Txoj cai-nias (lossis Ctrl+nyem) qhov chaw khoob hauv phau ntawv teev npe thiab xaiv "New Folder".
Txhawm rau kom yooj yim, nws yog lub tswv yim zoo los tsim lub chaw cia khoom ua ntej ntawm lub desktop
Kauj Ruam 3. Mus ntsib nplooj ntawv khaws khoom hauv lub vev xaib
Nkag mus rau nplooj ntawv ntawm GitHub chaw cia khoom (lossis ib yam khoom Git) koj xav tau clone. Qhov chaw khaws cia qhov chaw tau qhia ntawm nplooj ntawv khaws cia.
Txoj haujlwm tseeb ntawm qhov chaw nyob yuav nyob ntawm qhov chaw cia khoom siv, tab sis feem ntau pom nyob rau sab saum toj ntawm nplooj ntawv kom nkag tau yooj yim. Sim nrhiav qhov chaw cia khoom URL ntawm nplooj ntawv
Kauj Ruam 4. Luam qhov chaw nyob
Nyem qhov chaw nyob (feem ntau yog URL pib nrog "https" lossis "ssh") thiab nias qhov luv Ctrl+C lossis Cmd+C txhawm rau luam nws.
Kauj Ruam 5. Qhib Git GUI
Txoj haujlwm no tau teeb tsa ua ke nrog lwm cov cuab yeej Git. Hloov chaw ntawm kab hais kom ua (kab ntawv) lub qhov rais, koj yuav pom lub qhov rai uas muaj ob peb lub khawm nyem tau.
Kauj Ruam 6. Nyem “Clone Repository”
Qhov kev xaiv no yog thawj qhov kev xaiv ntawm nplooj ntawv khau raj txaws.
Koj tseem tuaj yeem xaiv "Clone" los ntawm "Repository" drop-down menu
Kauj Ruam 7. Nkag mus rau qhov chaw nyob
Muab tshuaj txhuam lossis ntaus lub chaw cia khoom qhov chaw nyob hauv daim teb uas tau muab.
Kauj Ruam 8. Nkag mus rau phau ntawv teev npe
Ntaus rau hauv qhov chaw nyob ntawm lub chaw cia khoom uas koj tau tsim.
Koj tseem tuaj yeem nyem "Xauj" txhawm rau tshawb rau daim nplaub tshev yam tsis tas yuav ntaus nws
Kauj Ruam 9. Nyem “Clone”
Lub qhov rais GUI yuav tso saib qhov kev ua tiav ntawm cov txheej txheem thiab ceeb toom rau koj ib zaug cov txheej txheem cloning tiav.
Txoj Kev 3 ntawm 3: Siv Visual Studio
Kauj Ruam 1. Mus ntsib lub chaw khaws ntaub ntawv ntawm lub web browser
Nkag mus rau nplooj ntawv ntawm GitHub chaw cia khoom (lossis lwm yam khoom GitHub) koj xav tau clone. Qhov chaw khaws cia qhov chaw tau qhia nyob rau sab saum toj ntawm nplooj ntawv.
Txoj haujlwm tseeb ntawm qhov chaw nyob yuav nyob ntawm qhov chaw cia khoom siv, tab sis feem ntau pom nyob rau sab saum toj ntawm nplooj ntawv kom nkag tau yooj yim. Sim nrhiav qhov chaw cia khoom URL ntawm nplooj ntawv
Kauj Ruam 2. Luam qhov chaw nyob
Nyem qhov chaw nyob (feem ntau yog URL pib nrog "https" lossis "ssh") thiab nias qhov luv Ctrl+C lossis Cmd+C txhawm rau luam nws.
Kauj Ruam 3. Qhib Visual Studio
Visual Studio yog qhov haujlwm zoo ib yam hauv Windows ib puag ncig kev txhim kho, tab sis nws tsis pub dawb siv. Koj tuaj yeem rub tawm VS Express kom tau txais tsab pub dawb (nrog rau cov yam ntxwv txwv).
Kauj Ruam 4. Xaiv "Team Explorer" tab
Cov ntawv no yog nyob hauv qab ntawm sab xis.
Kauj Ruam 5. Nyem rau qhov “Manage Connections” khawm
Lub pob no tau qhia los ntawm lub cim ntsaws thiab yog nyob rau sab saum toj ntawv qhia zaub mov bar ntawm sab xis.
Kauj Ruam 6. Nyem “Clone”
Nws nyob hauv ntu "Local git repositories" ntu ntawm sab xis.
Kauj Ruam 7. Nkag mus lossis muab qhov chaw nyob tso rau hauv kab ntawv
Ib zaug ntxiv rau kab ntawv, lub khawm "Clone" tuaj yeem nyem.
Kauj Ruam 8. Nyem “Clone”
Nws nyob hauv qab qhov chaw qhov chaw. Thaum nyem, qhov kev nce qib yuav raug tso tawm uas qhia qhov txheej txheem cloning. Cov txheej txheem tiav thaum lub bar tau them tag nrho.
Lub cloned repository tau cia li cloned rau cov npe hauv zos hauv Visual Studio directory
Lub tswv yim
- Siv git rub los hloov kho qhov chaw cia khoom, tsis txhob rov ua dua tshiab. Rov ua dua tshiab hauv qee qhov xwm txheej (piv txwv li thaum koj muaj teeb meem ua ke lossis teeb meem muab tso ua ke).
- Txhawm rau clone nws git clone nyob deb, siv hom ntawv "username@host:/address/to/repository" tom qab "git clone".
- Yog tias koj txav cov npe chaw cia khoom, xyuas kom tseeb tias koj tau hloov kho kom raug thaum sim nkag mus rau nws dua los ntawm kab hais kom ua.