Kuv yuav rov pib dua cov ntaub ntawv li cas rau qhov kev cog lus zaum kawg?
Kuv yuav rov pib dua cov ntaub ntawv li cas rau qhov kev cog lus zaum kawg?

Video: Kuv yuav rov pib dua cov ntaub ntawv li cas rau qhov kev cog lus zaum kawg?

Video: Kuv yuav rov pib dua cov ntaub ntawv li cas rau qhov kev cog lus zaum kawg?
Video: Tsis Siab Los Hlub Tiag - SODA Poj Laib Khej Me (Cover) 2024, Kaum ib hlis
Anonim

git rov pib dua -- nyuaj

Cov lus txib no thim rov qab cov repo mus rau lub xeev ntawm HEAD hloov kho, uas yog kawg cog lus version. Git pov tseg tag nrho cov kev hloov pauv uas koj tau ua txij li qhov ntawd. Siv lub checkout hais kom ua nrog ob dashes, ces txoj kev mus rau lub ntaub ntawv rau qhov koj xav tau rov qab los rau nws yav dhau los xeev.

Tom qab ntawd, ib tug kuj yuav nug, yuav ua li cas koj revert ib cov ntaub ntawv nyob rau hauv ib tug commit?

Yog koj xav tau rov qab los kawg cog lus tsuas yog ua git rov qab los <tsis xav tau cog lus hash>; ces koj tuaj yeem thawb qhov tshiab no cog lus , uas undid koj yav dhau los cog lus . Txhawm rau kho lub taub hau detached ua git checkout.

Ib yam li ntawd, kuv yuav rov qab mus rau yav dhau los ntawm cov ntaub ntawv hauv Git li cas? Rov qab Rau An Qub Version ntawm Repository Pib los ntawm kev mus rau "History" tab. Right-click rau ntawm qhov yav dhau los cog lus, thiab koj yuav pom qhov kev xaiv rau rov qab los qhov kev cog lus. Yog koj nias rau Rov qab Qhov kev cog lus no, ob yam yuav tshwm sim. Thawj yog tias cov cov ntaub ntawv nyob rau hauv koj lub repository yuav rov qab los rau lawv yav dhau los xeev.

Hauv qhov no, koj yuav ua li cas rov qab cog lus yam tsis muaj kev hloov pauv?

Yog tias koj thawb lub kev hloov , koj ua tau thim rov qab nws thiab txav cov ntaub ntawv rov qab mus rau theem tsis muaj siv lwm ceg.

  1. Mus rau Version tswj qhov rais (Alt + 9 / Command + 9) - "Log" tab.
  2. Right-click rau ib qho kev cog lus ua ntej koj qhov kawg.
  3. Pib dua ceg tam sim no rau ntawm no.
  4. xaiv Soft (!!!)
  5. thawb lub Reset khawm nyob hauv qab ntawm lub qhov rais dialog.

Kuv yuav tshem tawm cov ntaub ntawv los ntawm git commit li cas?

  1. Txhawm rau tshem tawm qee cov ntaub ntawv los ntawm Git cog lus, siv "git rov pib dua" hais kom ua nrog "–soft" kev xaiv thiab qhia meej qhov kev cog lus ua ntej HEAD.
  2. Txhawm rau tshem tawm cov ntaub ntawv los ntawm kev cog lus, siv "git restore" hais kom ua, qhia qhov chaw siv qhov kev xaiv "–source" thiab cov ntaub ntawv yuav raug tshem tawm ntawm qhov chaw cia.

Pom zoo: