Cov txheej txheem:

Yuav ua li cas koj git tag ib commit?
Yuav ua li cas koj git tag ib commit?

Video: Yuav ua li cas koj git tag ib commit?

Video: Yuav ua li cas koj git tag ib commit?
Video: Qis muag ua neej 7/14/2018 2024, Kaum ib hlis
Anonim

Tagging Laus Kev cog lus

Los ntawm lub neej ntawd, git tag yuav tsim ib tag ntawm cog lus tias HEAD yog referencing. Xwb git tag tuaj yeem dhau los ua tus ref rau ib qho tshwj xeeb cog lus . Qhov no yuav tag cov dhau lawm cog lus es tsis txhob defaulting rau HEAD. Mus sau ib daim ntawv teev cov laus cog lus execute cov git log lus txib.

Hais txog qhov no, kuv yuav ua li cas thiaj li tag ib qho kev cog lus yav dhau los?

git push origin --tags

  1. Sau tag nrho cov kev cog lus yav dhau los -
  2. Nrhiav qhov kev cog lus uas koj xav kom tag thiab nco ntsoov qhov kev cog lus id.
  3. Tam sim no tag uas commit -
  4. Thawb lub tag mus rau lub server.

git puas tuaj yeem muaj ntau lub cim npe? Thaum kuv ua ob tag mus rau qhov qub cog lus , Kuv pom tias hauv. git /refs/ tag tias txhua tus ntawm tag muaj nws yog tus kheej cog lus yog li nws yog theoretically muaj peev xwm mus xyuas qhov tseeb tag nyob rau hauv ib tug unambiguous zam. Hauv kev xyaum tsis yog li ntawd. git /HEAD tus ref mus rau ceg kom tag nrho yog qhov zoo, nws tsis tsis meej tab sis ib ceg tshwj xeeb.

Xav txog qhov no, git tags ua haujlwm li cas?

Cim npe hauv git yog cov ntaub ntawv hnyav uas taw tes rau SHA hash ntawm kev cog lus. Tsis zoo li cov ceg ntoo, lawv tsis hloov pauv thiab ib zaug tsim yuav tsum tsis txhob muab tshem tawm. Cim npe tej zaum yuav sib sib zog nqus (nyob rau hauv cov ntaub ntawv lawv xa mus rau qhov kev cog lus ncaj qha) los yog annotated (nyob rau hauv cov ntaub ntawv no lawv taw tes rau ib tug tag yam khoom uas taw qhia rau kev cog lus).

Dab tsi yog tag hauv Git ntsiab lus?

A tag yog siv rau hauv Git cov ntsiab lus rau kos ib tug tshwj xeeb version. Xwb, tag yog siv los cim cov ntsiab lus tshwj xeeb hauv keeb kwm tseem ceeb lossis kos cov ntsiab lus tso tawm. Ib zaug ib tag yog teem, nws yog feem ntau tsis tsiv tom qab ntawd. Qhov no yog rau xws li tag.

Pom zoo: