Cov txheej txheem:

Dab tsi yog qhov tseem ceeb ntawm git commit command?
Dab tsi yog qhov tseem ceeb ntawm git commit command?

Video: Dab tsi yog qhov tseem ceeb ntawm git commit command?

Video: Dab tsi yog qhov tseem ceeb ntawm git commit command?
Video: Koj Hais Dab Tsi?/Suabci Kwm & Ab Meej Ham/Official MV 2023 2024, Kaum ib hlis
Anonim

git cog . Cov " cog lus " lus txib yog siv los txuag koj cov kev hloov pauv rau hauv lub chaw khaws cia hauv zos. Nco ntsoov tias koj yuav tsum qhia meej Git cov kev hloov pauv uas koj xav kom suav nrog hauv a cog lus ua ntej khiav " git cog " lus txib . Qhov no txhais tau hais tias ib cov ntaub ntawv yuav tsis raug suav nrog rau tom ntej cog lus vim nws twb hloov lawm.

Ib yam li ntawd, tib neeg nug, nws txhais li cas rau kev ua txhaum hauv git?

git github git - cog lus . cog lus yog. A cog lus , los yog "revision", yog ib tug neeg hloov mus rau ib cov ntaub ntawv (los yog cov ntaub ntawv teev). Nws zoo li thaum koj khaws cov ntaub ntawv, tsuas yog nrog Git , txhua zaus koj khaws nws tsim ib tus ID tshwj xeeb (aka "SHA" lossis "hash") uas tso cai rau koj khaws cov ntaub ntawv hloov pauv tau ua thaum twg thiab los ntawm leej twg.

Tsis tas li ntawd, kuv yuav ua li cas ua ib daim ntawv hauv Git? Qhov yooj yim Git flow zoo li no:

  1. Tsim cov ntaub ntawv tshiab hauv cov npe hauv paus lossis hauv subdirectory, lossis hloov kho cov ntaub ntawv uas twb muaj lawm.
  2. Ntxiv cov ntaub ntawv mus rau thaj chaw staging los ntawm kev siv "git add" hais kom ua thiab dhau cov kev xaiv tsim nyog.
  3. Muab cov ntaub ntawv mus rau lub chaw cia khoom hauv zos siv cov lus txib "git commit -m".
  4. Rov ua dua.

Ua kom pom qhov no, nws txhais li cas rau kev cog lus?

Thaum neeg ua code , lawv khaws lawv cov kev hloov pauv rau keeb kwm no. Rau ua code , koj siv version tswj software xws li Git, Mercurial, lossis Subversion. Thaum neeg ua code , lawv khaws lawv cov kev hloov pauv rau keeb kwm no. Rau ua code , koj siv version tswj software xws li Git, Mercurial, lossis Subversion.

Kuv yuav cog lus li cas rau git hauv davhlau ya nyob twg?

Txhawm rau sau git cog lus, pib los ntawm kev ntaus git cog lus ntawm koj lub Terminal lossis Command Prompt uas coj los ntawm Vim interface rau nkag mus rau cov lus cog lus

  1. Ntaus cov ntsiab lus ntawm koj qhov kev cog lus ntawm thawj kab.
  2. Sau cov lus piav qhia ntxaws txog dab tsi tshwm sim hauv qhov kev hloov pauv uas tau cog lus tseg.
  3. Nias Esc thiab tom qab ntawd ntaus: wq txuag thiab tawm.

Pom zoo: