Yuav ua li cas Clone Lub Chaw Tso Khoom ntawm GitHub

Cov txheej txheem:

Yuav ua li cas Clone Lub Chaw Tso Khoom ntawm GitHub
Yuav ua li cas Clone Lub Chaw Tso Khoom ntawm GitHub

Video: Yuav ua li cas Clone Lub Chaw Tso Khoom ntawm GitHub

Video: Yuav ua li cas Clone Lub Chaw Tso Khoom ntawm GitHub
Video: Yuav ua li cas txhaj tshuaj tiv thaiv rau cov hluas? 2024, Hlis ntuj nqeg
Anonim

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

Clone Lub Chaw Tso Khoom ntawm Github Kauj Ruam 1
Clone Lub Chaw Tso Khoom ntawm Github Kauj Ruam 1

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.

Clone Lub Chaw Tso Khoom ntawm Github Kauj Ruam 2
Clone Lub Chaw Tso Khoom ntawm Github Kauj Ruam 2

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

Clone Lub Chaw Tso Khoom ntawm Github Kauj Ruam 3
Clone Lub Chaw Tso Khoom ntawm Github Kauj Ruam 3

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.

Clone Lub Chaw Tso Khoom ntawm Github Kauj Ruam 4
Clone Lub Chaw Tso Khoom ntawm Github Kauj Ruam 4

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.
Clone Lub Chaw Tso Khoom ntawm Github Kauj Ruam 5
Clone Lub Chaw Tso Khoom ntawm Github Kauj Ruam 5

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

Clone Lub Chaw Tso Khoom ntawm Github Kauj Ruam 6
Clone Lub Chaw Tso Khoom ntawm Github Kauj Ruam 6

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.

Clone Lub Chaw Tso Khoom ntawm Github Kauj Ruam 7
Clone Lub Chaw Tso Khoom ntawm Github Kauj Ruam 7

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

Clone Lub Chaw Tso Khoom ntawm Github Kauj Ruam 8
Clone Lub Chaw Tso Khoom ntawm Github Kauj Ruam 8

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

Clone Lub Chaw Tso Khoom ntawm Github Kauj Ruam 9
Clone Lub Chaw Tso Khoom ntawm Github Kauj Ruam 9

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.

Clone Lub Chaw Tso Khoom ntawm Github Kauj ruam 10
Clone Lub Chaw Tso Khoom ntawm Github Kauj ruam 10

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

Clone Lub Chaw Tso Khoom ntawm Github Kauj Ruam 11
Clone Lub Chaw Tso Khoom ntawm Github Kauj Ruam 11

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

Clone Lub Chaw Tso Khoom ntawm Github Kauj Ruam 12
Clone Lub Chaw Tso Khoom ntawm Github Kauj Ruam 12

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.

Clone Lub Chaw Tso Khoom ntawm Github Kauj Ruam 13
Clone Lub Chaw Tso Khoom ntawm Github Kauj Ruam 13

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.

Clone Lub Chaw Tso Khoom ntawm Github Kauj Ruam 14
Clone Lub Chaw Tso Khoom ntawm Github Kauj Ruam 14

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

Clone Lub Chaw Tso Khoom ntawm Github Kauj Ruam 15
Clone Lub Chaw Tso Khoom ntawm Github Kauj Ruam 15

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.

Clone Lub Chaw Tso Khoom ntawm Github Kauj Ruam 16
Clone Lub Chaw Tso Khoom ntawm Github Kauj Ruam 16

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

Clone Lub Chaw Tso Khoom ntawm Github Kauj Ruam 17
Clone Lub Chaw Tso Khoom ntawm Github Kauj Ruam 17

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

Clone Lub Chaw Tso Khoom ntawm Github Kauj Ruam 18
Clone Lub Chaw Tso Khoom ntawm Github Kauj Ruam 18

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

Clone Lub Chaw Tso Khoom ntawm Github Kauj Ruam 19
Clone Lub Chaw Tso Khoom ntawm Github Kauj Ruam 19

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.

Clone Lub Chaw Tso Khoom ntawm Github Kauj Ruam 20
Clone Lub Chaw Tso Khoom ntawm Github Kauj Ruam 20

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).

Clone Lub Chaw Tso Khoom ntawm Github Kauj Ruam 21
Clone Lub Chaw Tso Khoom ntawm Github Kauj Ruam 21

Kauj Ruam 4. Xaiv "Team Explorer" tab

Cov ntawv no yog nyob hauv qab ntawm sab xis.

Clone Lub Chaw Tso Khoom ntawm Github Kauj Ruam 22
Clone Lub Chaw Tso Khoom ntawm Github Kauj Ruam 22

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.

Clone Lub Chaw Tso Khoom ntawm Github Kauj Ruam 23
Clone Lub Chaw Tso Khoom ntawm Github Kauj Ruam 23

Kauj Ruam 6. Nyem “Clone”

Nws nyob hauv ntu "Local git repositories" ntu ntawm sab xis.

Clone Lub Chaw Tso Khoom ntawm Github Kauj Ruam 24
Clone Lub Chaw Tso Khoom ntawm Github Kauj Ruam 24

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.

Clone Lub Chaw Tso Khoom ntawm Github Kauj Ruam 25
Clone Lub Chaw Tso Khoom ntawm Github Kauj Ruam 25

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.

Pom zoo: