Iyini i-GitHub, kungani idingeka nokuthi uyisebenzisa kanjani i-GitHub, ungaqala kanjani ukusebenzisa isevisi – umhlahlandlela wabaqalayo.
I-GitHub ingenye yezinsizakalo ezidume kakhulu zokusingatha amakhosombe omthombo ovulekile. Isayithi likuvumela ukuthi ushicilele amaphrojekthi wangokwezifiso futhi ulandelele izinguquko ezenziwe ekuphindaphindweni ngakunye. Abanye abasebenzisi be-GitHub bangabuyekeza ikhodi yomsebenzisi futhi baphakamise izinguquko zabo. Le ncazelo inikeza ukuqonda okufushane kuphela. Nokho, ukusebenza kwesevisi akugcini kulokhu. Kulesi sihloko sokubuyekezwa, sizobheka i-Github ngokuningiliziwe.
- Iyini i-GitHub nokuthi Ungaqala Kanjani – Umhlahlandlela Wabaqalayo
- I-Git ne-GitHub – uyini umehluko, ukwazana kokuqala ne-Git ne-GitHub
- Iyini i-Git?
- Iyini i-GitHub?
- Uyini umehluko omkhulu?
- Amaqiniso athakazelisayo nge-Github
- Izici ze-Github
- Isebenza kanjani i-GitHub, Izici
- Ukufohla
- Donsa izicelo
- Ukuhlanganisa
- Umhlahlandlela – ungaqala kanjani ku-Github kusukela ekuqaleni
- Isinyathelo 0Faka i-Git bese udala i-akhawunti ye-GitHub
- Isinyathelo 1: Yethula i-Git bese udala inqolobane yasendaweni yokuqala
- Isinyathelo 2. Dala ifayela elisha endaweni yokugcina
- Isinyathelo sesi-3: Engeza ifayela endaweni yokulandela umkhondo
- Isinyathelo 4 Dala isivumelwano
- Isinyathelo sesi-5. Dala igatsha elisha legatsha
- Isinyathelo 6Dala Indawo Entsha Ye-GitHub
- Isinyathelo sesi-7: Iphushela Igatsha Lephrojekthi ku-GitHub
- Ukwengeza
- Isinyathelo 8. Dala isicelo sokuqala sokudonsa
- Isinyathelo 9 Hlanganisa isicelo sokudonsa
- Isinyathelo 10Buyisela Izinguquko Ze-Github Emshinini Wasendaweni
- Izici ezengeziwe ze-Github ne-Git
- Ukuhlanganisa indawo yokugcina umshini wendawo
- Ukuthola amakhosombe akude
- Inguqulo yedeskithophu ye-GitHub – yini i-GitHub Desktop, ukusebenza okuyinhloko, izici nenqubo yokufaka
- Indlela yokufaka
- Ukusebenza okuyinhloko
- I-Github API
- Ukuphatha nokulungiselela amaphrojekthi we-Github Desktop
- Ukudala, ukungeza kanye nokuhlanganisa inqolobane
- Ukudala Igatsha Elisha
- Ukuphepha
- Ukulungiselelwa kwenqubomgomo yezokuphepha
- Ukuphathwa Kwegrafu Yokuncika
- Amalayisense
Iyini i-GitHub nokuthi Ungaqala Kanjani – Umhlahlandlela Wabaqalayo
I-GitHub iyingosi eku-inthanethi lapho abathuthukisi nabahleli bezinhlelo bengalayisha khona ikhodi abayakhayo futhi basebenzisane ukuze bayithuthukise. Uphawu oluphawulekayo lwe-GitHub uhlelo lwayo lokulawula inguqulo eqinile. Ukulawulwa kwenguqulo kuvumela abahleli bezinhlelo ukuthi benze isofthiwe ngendlela oyifisayo ngaphandle kokufaka engozini isofthiwe ngokwayo. Izinguquko ezihlongozwayo zingahlanganiswa kalula zibe ukukhishwa okugcwele, kodwa kuphela ngemva kokuba zonke izinguquko sezibuyekeziwe futhi zavunyelwa.
I-Git ne-GitHub – uyini umehluko, ukwazana kokuqala ne-Git ne-GitHub
Iyini i-Git?
Impendulo: Isistimu yokulawula inguqulo esheshayo nengakalayo . I-Git iwuhlelo lokulawula lokubuyekeza olusabalalisiwe lwamahhala nomthombo ovulekile olwakhelwe ukushesha futhi lusebenze kahle kunoma iyiphi iphrojekthi, kusukela kwencane kuye enkulu kakhulu.
Iyini i-GitHub?
Impendulo: isevisi yefu enamandla yokuphatha ukuthuthukiswa kwangasese namaphrojekthi omthombo ovulekile.
Uyini umehluko omkhulu?
I-Git isofthiwe egcwele ngokugcwele esigabeni sokulawula inguqulo, efakwa kukhompuyutha yomuntu siqu yomsebenzisi. I-Git ikuvumela ukuthi wenze izinguquko kukhodi ngomugqa womyalo (Microsoft PowerShell), futhi i-GitHub inikeza amandla okugcina amaphrojekthi ekufinyeleleni komphakathi.
Amaqiniso athakazelisayo nge-Github
- Inombolo enkulu yabasebenzisi kusayithi ngonyaka odlule (ngokwezibalo zangoJulayi 24, 2021) yayingabantu abayizigidi ezingu-45.
- Ngo-2018, iMicrosoft yathola i-GitHub ngama- $ 7.5 billion.
- Kukhona indawo yokugcina ye-git yomthombo ovulekile ku-Github. Noma ubani angenza izinguquko kuyo. Iphrojekthi iyatholakala kusixhumanisi – https://github.com/git/git?ref=stackshare
[i-id yamagama-ncazo = “okunamathiselwe_12723″ align=”aligncenter” wide=”751″]
Isibonelo sekhosombe le-GitHub[/caption]
Izici ze-Github
- Ikhono lokuhlanganisa nezinkundla nezinkonzo ezidume kakhulu – i-Amazon, i-Google Cloud kanye ne-Code Climate.
- Ukusekelwa kwezilimi zokuhlela ezingaphezu kuka-200.
- Izinga eliphezulu lokuhlanganisa kanye “nobumbano lwenhlangano”. Uma umsebenzisi eshicilela iphrojekthi yakhe ku-GitHub, wonke umphakathi ohlelayo ungadawuniloda futhi uhlole umsebenzi, ikhwalithi yekhodi, nezinga lobunkimbinkimbi bayo. Abasebenzisi bezinkampani zangaphandle bangaxwayisa umnikazi wephrojekthi mayelana nezinkinga ezingaba khona, izingxabano eziguquguqukayo, njll.
Isebenza kanjani i-GitHub, Izici
Izici ezintathu ezibaluleke kakhulu ze-Github ukuhlanganisa, ukudonsa izicelo, nokuhlanganisa. Kuyafaneleka ukucabangela umsebenzi ngamunye ngokwehlukana.
Ukufohla
Ukufohla iphrojekthi kudala ikhophi (imfoloko) evumela umsebenzisi ukuthi ahlole ngokukhululekile ngaphandle kokuthikameze iphrojekthi yokuqala. Dala izimfoloko bese udonsa izicelo: https://youtu.be/nT8KGYVurIU
Donsa izicelo
Isicelo sokudonsa sishicilelwa unjiniyela ngemuva kokuqeda ukusebenza ukulungisa/ukushintsha ikhodi. Ngesikhathi esifanayo, umnikazi wephrojekthi ngokwakhe angabuyekeza izinguquko ezenziwe futhi abuze noma yimiphi imibuzo eyengeziwe.
Ukuhlanganisa
Ngemuva kokuthi umnikazi egunyaze isicelo sokudonsa, bahlanganisa isicelo sokudonsa futhi basebenzise izinguquko kusuka kuphrojekthi efojiwe ukuya kukhodi yomthombo.
Umhlahlandlela – ungaqala kanjani ku-Github kusukela ekuqaleni
Lo mhlahlandlela ulungele bonke abasaqalayo abasanda kuqala ukufunda i-Git ne-Github. Izinyathelo ezilandelayo zizokusiza ukuthi wakhe isistimu elungile yokusebenza nale software. Uzofunda ukwenza izinguquko ku-codebase, uvule isicelo sokudonsa (dala isicelo sokudonsa), futhi uhlanganise ikhodi egatsheni eliyinhloko. Ngakho ake siqale. [i-id yamagama-ncazo = “okunamathiselwe_12726″ align=”aligncenter” wide=”740″]
Ideshibhodi ye-akhawunti ye-GitHub[/caption]
Isinyathelo 0Faka i-Git bese udala i-akhawunti ye-GitHub
- Iya kuwebhusayithi esemthethweni ye-Git: https://git-scm.com/downloads
- Chofoza isixhumanisi ukuze ulande inguqulo yedeskithophu ye-Git ye-Windows bese ulinda ukuthi ukulanda kuqedwe.
- Khipha futhi usebenzise isifaki se-Git ngokuchofoza kabili ifayela le-Git.exe.
- Vumela uhlelo lokusebenza ukwenza izinguquko ku-PC ngokuchofoza inkinobho ethi “Yebo” ebhokisini lengxoxo elithi “Ukulawula I-akhawunti Yomsebenzisi” elivulekayo.
- Qala inqubo yokufaka i-Git. Funda idokhumenti eyinhloko Yelayisense Yomphakathi ye-GNU bese uchofoza Okulandelayo.
- Cacisa indawo ongafaka kuyo uhlelo, noma ushiye amanani azenzakalelayo. Uhlelo luzokwazisa ukuthi udale ifolda yemenyu yokuqala. Yeqa le nto.
- Khetha isihleli sombhalo ofuna ukusisebenzisa ne-Git. Ewindini lokudonsela phansi, khetha i-Notepad ++ (noma yimuphi omunye umhleli wombhalo oke wasebenza nawo ngaphambilini) bese uchofoza “Okulandelayo”.
- Cacisa igama legatsha lephrojekthi entsha. Inani elizenzakalelayo lithi “master”. Kunconywa ukuthi ushiye lesi silungiselelo ngokuzenzakalelayo.
- Ezinkethweni zokukhetha INDLELA, iklayenti le-SSH, izitifiketi zeseva, ukuphela komugqa kanye nesiphetho, shiya yonke into njengoba injalo bese uchofoza inkinobho ethi “Okulandelayo”.
- Shiya zonke izilungiselelo ezizenzakalelayo bese uqala ukufaka uhlelo.
- Uma ukufakwa sekuqediwe, hlola amabhokisi ukuze ubuke amanothi okukhululwa bese uqala i-Git Bash. Vala iwindi lesifaki.
Ungabhalisa i-akhawunti ku-Github usebenzisa isixhumanisi esilandelayo: https://github.com/join. Ukuze wenze lokhu, kufanele ufake idatha yokubhalisa eyisisekelo edingekayo esikhathini esizayo ukuze uqinisekise i-akhawunti.
Isinyathelo 1: Yethula i-Git bese udala inqolobane yasendaweni yokuqala
I-Git inezinhlobo ezimbili zokusetshenziswa – i-bash (i-Git Bash) kanye nesixhumi esibonakalayo somsebenzisi (i-Git GUI). Ukuqala i-Git Bash, vula imenyu yokuqala – Windows, thayipha i-git bash bese ucindezela u-Enter (noma chofoza kabili kwesokunxele esinqamuleli sohlelo). Ukuze uqalise i-Git GUI, vula imenyu yokuqala – Windows, thayipha i-git gui bese ucindezela u-Enter. Esimweni sethu, sizosebenzisa i-Git Bash.
Ukudala iphrojekthi entsha ku-Git Bash kuhilela ukusebenzisa imiyalo ekhethekile ukuqalisa inqolobane entsha. Okokuqala udinga ukuvula i-terminal ye-Bash ngokuchofoza kwesokudla kudeskithophu bese ukwimenyu yokudonsela phansi i-Git Bash Lapha. Efasiteleni letheminali emshinini wangakini, dala uhla lwemibhalo olusha lokuhlola (ifolda) ngokuthayipha okulandelayo:
getrekt:Desktop getrekt $ cd ~/Desktop
getrekt:Desktop getrekt $ mkdir myproject
getrekt:Desktop getrekt $ cd myproject/
Umyalo we- mkdir udala ifolda yephrojekthi yendawo entsha. Dala inqolobane yethu yokuqala ye-Github: https://youtu.be/yHCUc6cmhcc
Isinyathelo 2. Dala ifayela elisha endaweni yokugcina
Kufolda yephrojekthi, engeza ifayela lombhalo elisha usebenzisa umyalo wokuthinta. Ngendlela evamile, umyalo uzodala ifayela lombhalo elingenalutho elizoba nesandiso se-.txt.
Qaphela! I-Git igcina/iphatha izinguquko kuphela kumafayela ewalandelayo. Ngemva kokudala ifayela elisha, umsebenzisi angakwazi ukulandelela isimo salo esebenzisa umyalo wesimo se-git. Ikhonsoli izonikeza uhlu lwamafayela akhona endaweni yokugcina.
Lapho nje ungeza ifayela kufolda equkethe inqolobane ye-git, uhlelo luzobona ushintsho ngaphakathi kwephrojekthi. Nokho, ukulandelela okuzenzakalelayo ngeke kunikwe amandla, kufanele usebenzise umyalo okhethekile kulokhu – git add.
getrekt:myproject getrekt $ touch getrekt.txt
getrekt:myproject getrekt $ ls
getrekt.txt
Isinyathelo sesi-3: Engeza ifayela endaweni yokulandela umkhondo
Faka ifayela endaweni yesiteji ngomyalo we-git add.
getrekt:myproject git add . Ngalo myalo, uhlelo luzoqala ukulandelela okuzenzakalelayo kwawo wonke amafayela azodalwa kufolda yephrojekthi. Ungahlola ukuthi umyalo usebenza nesimo se-git. Yile ndlela amalogi abukeka ngayo emugqeni womyalo we-Git Bash ngemva kokuthayipha isimo se-git:
getrekt: getrekt getrekt$ git status Kumphathi wegatsha Ukuzibophezela
kokuqala
Izinguquko
okumele zenziwe:
(sebenzisa “git rm –cached …” ukuze unstage)
Ifayela elisha lingeziwe
Igama lefayela elisha: getrekt.txt
Ifayela elisha: getrekt.txt Amazwana welogu: Ifayela alikakaboshwa, kodwa selizokwengezwa.
Isinyathelo 4 Dala isivumelwano
Ukuzibophezela indawo yokuhlola yanoma iyiphi inqolobane. Kalula nje, iphakheji yokushintsha egcina ulwazi mayelana namafayela angeziwe, ahleliwe noma asusiwe agcina ikhodi ethile.
getrekt:myproject getrekt $ git commit -m “MY FIRST COMIT GUYS!”
[master (root-commit) b345d9a] UKUZINIKELA KWAMI KOKUQALA!
Ifayela elingu-1 lishintshile, 1 ukufaka(+)
imodi yokudala 100644 getrekt.txt
Umyalo wokwenza isivumelwano uthi git commit -m “Commit Name”.
Qaphela! Umlayezo osekupheleni komyalo kufanele ube nenjongo futhi uqondakale kwabanye abathuthukisi bephrojekthi. Ungaqambi izibopho zakho njengokuthi “asdfadsf” noma “foobar”. Uma kungenjalo, akekho ozoqonda lutho, futhi kuzodingeka uchithe isikhathi esiningi uzisusa.
Isinyathelo sesi-5. Dala igatsha elisha legatsha
Igatsha elisha liyigatsha eliphelele lephrojekthi, eliqukethe isethi yonke yezibopho. Imele ukukhishwa okuhlukile komkhiqizo, kodwa ngaphakathi kwesistimu yokulawula inguqulo. Amagatsha avumela umsebenzisi ukuthi ahambe phakathi “kwezifunda” zephrojekthi.
Emibhalweni ye-git esemthethweni, incazelo yamagatsha ithi: “Igatsha e-Git nase-Github liyinkomba esuswayo kwesinye sezibopho zenqolobane.”
Isibonelo, uma umsebenzisi efuna ukwengeza ikhasi elisha kuwebhusayithi yakhe, angakwazi ukudala igatsha elisha kulelo khasi ngaphandle kokuthikameze indikimba eyinhloko yephrojekthi. Lapho nje eseqedile ngakho, angakwazi ukuhlanganisa izinguquko ezivela egatsheni lakhe zibe ngeliyinhloko. Endabeni yegatsha elisha, i-Git ilandelela ukuthi iyiphi i-branched kusuka kuyo.
Ngemva kokwenza umyalo, ungathayipha igatsha le-git kukhonsoli ukuze uqinisekise ukudalwa kwegatsha:
getrekt:myproject getrekt $ git branch
master
* my-new-branch Igama elithi-igatsha-elisha elinenkanyezi libonisa ukuthi iliphi igatsha umsebenzisi. ivuliwe okwamanje.
Qaphela: Ngokuzenzakalelayo, igatsha lokuqala le-git repo ngayinye liqanjwa ngokuthi “master” (futhi ngokuvamile lisetshenziswa njengomphathi kuphrojekthi). Njengengxenye yokulwa nokucwasa, abanye onjiniyela sebeqalile ukusebenzisa amanye amagama egatsha elimisiwe, njengokuthi “okuyinhloko”. Nokho, kaningi kunalokho, abasebenzisi bangabona “inkosi” noma amagama afanayo asetshenziselwa ukubhekisela kuyo.
Kuhle ukukhumbula ukuthi cishe yonke inqolobane inegatsha elikhulu elingathathwa njengenguqulo esemthethweni yephrojekthi. Uma kuyiwebhusayithi, igatsha liyinguqulo ebonwa abasebenzisi. Uma kuwuhlelo lokusebenza, igatsha elikhulu liwukukhululwa okufakwa abasebenzisi kukhompuyutha yabo noma idivayisi yeselula. Lena yindlela ukuguqulwa kwendabuko kwemikhiqizo ye-Git ne-Github kusebenza ngayo. Isayithi elisemthethweni linemininingwane eminingi yokusebenzisa amagama amagatsha amisiwe. Ulwazi luyatholakala ku-Github kokuthi https://github.com/github/renaming
Esimeni sokubuyela egatsheni lephrojekthi nokudala imisebenzi eminingi, igatsha elisha ngeke lilandelwe uhlelo lokulawula inguqulo kuze kube yilapho umsebenzisi ebhala ukulandelela okuzenzakalelayo. .
Isinyathelo 6Dala Indawo Entsha Ye-GitHub
Lesi sinyathelo asidingeki uma ufuna kuphela ukuqapha ikhodi yakho endaweni. Kodwa uma nisebenza eqenjini futhi wamukela izinguquko ezivela kwabanye abahleli bohlelo, ungasebenzisa amakhono wamanje we-GitHub ukushintsha ngokuhlanganyela ikhodi yephrojekthi. Ukuze udale indawo yokugcina entsha ku-GitHub, udinga ukungena kusistimu futhi uye ekhasini eliyinhloko lesayithi. Kumenyu enkulu, chofoza inkinobho ethi “Indawo Entsha”, etholakala ngaphansi kophawu “+” eduze kwesithombe sephrofayela ekhoneni eliphezulu kwesokudla sebha yokuzulazula: Ngemva kokuchofoza inkinobho, i-GitHub izobuza umnikazi wephrojekthi. ukuqamba indawo yokugcina futhi unikeze incazelo emfushane:
Okulandelayo, chofoza inkinobho ethi “Dala indawo yokugcina” ukuze uqinisekise ukudalwa kwephrojekthi entsha. Ibhokisi lengxoxo lizovela libuza umsebenzisi ukuthi uyafuna yini ukudala indawo yokugcina kusukela ekuqaleni noma engeza ekhona edalwe endaweni. Esimweni sesibili, udinga ukulayisha ifolda yephrojekthi ku-Github.
Qaphela! Ukulanda ikhosombe lendawo kungenzeka futhi kusetshenziswa umugqa womyalo, futhi ikakhulukazi imiyalo git remote add origin github_url (yakha irekhodi loxhumano olusha endaweni yokugcina ekude), git push -u origin master (isungula uxhumano phakathi kwegatsha ku lapho unjiniyela atholakala khona kanye negatsha eliyinhloko kuseva ekude).
Yile ndlela izingodo ezibukeka ngayo kulayini womyalo we-Git Bash:
getrekt:myproject getrekt $ git remote add source https://github.com/cubeton/mynewrepository.git
getrekt:myproject getrekt $ git push -u origin master
Ukubala izinto: 3, kwenziwe.
Izinto zokubhala: 100% (3/3), 263 bytes | 0 amabhayithi/s, kwenziwe.
Isamba esingu-3 (delta 0), siphinde sasetshenziswa 0 (delta 0)
Ku-https://github.com/cubeton/mynewrepository.git
* [igatsha elisha] master -> umpetha
Wegatsha umisiwe ukuze alandelele umnikazi wegatsha oqhelile kusukela kumvelaphi.
Isinyathelo sesi-7: Iphushela Igatsha Lephrojekthi ku-GitHub
Igatsha lephrojekthi entsha kanye nenqolobane idaliwe. Kusele “ukuphusha” igatsha bese ulidlulisela endaweni yokugcina ye-Github. Ngale ndlela, amalungu omphakathi ezinkampani zangaphandle azokwazi ukubona ikhodi futhi enze izinguquko kuyo. Uma ukubuyekezwa kuvunyiwe, umnikazi wephrojekthi angahlanganisa izinguquko zibe inguqulo eyinhloko yephrojekthi. Ukuze ucindezele izinguquko egatsheni elisha ku-GitHub, udinga ukufaka umyalo we-git push kulayini womyalo. I-GitHub izodala ngokuzenzakalelayo igatsha endaweni yokugcina ekude:
getrekt:myproject getrekt$ git push origin my-new-branch
Ukubala izinto: 3, kwenziwe.
Ukucindezelwa kwe-Delta kusetshenziswa imicu emi-8.
Ukucindezela izinto: 100% (2/2), kwenziwe.
Izinto zokubhala: 100% (3/3), 313 bytes | 0 amabhayithi/s, kwenziwe.
Isamba esingu-3 (delta 0), siphinde sasetshenziswa 0 (delta 0)
Ku-https://github.com/cubeton/mynewrepository.git
* [igatsha elisha] my-new-branch -> my-new-branch Ngemva kokuvuselela ikhasi le-GitHub, umsebenzisi uzobona igatsha elisha eliphushelwe ku- inqolobane.
Ukwengeza
Lisho ukuthini igama elithi umsuka kumyalo wemvelaphi ye-git? Lapho umsebenzisi enza i-repository ekude emshinini wabo wasendaweni, i-git idala isibizo sayo esivamile cishe kuzo zonke izimo, “imvelaphi”, okuyi-shorthand ye-URL yendawo yokugcina ekude. Ukuhambisa iphrojekthi ku-GitHub: https://youtu.be/zM6z57OtR2Q
Isinyathelo 8. Dala isicelo sokuqala sokudonsa
Isicelo sokudonsa (noma isicelo sokudonsa) siyindlela yokuxwayisa abanikazi bendawo ukuthi umthuthukisi ufuna ukwenza izinguquko ezithile kukhodi. Nansi indlela ikhasi elinesicelo sokudonsa elingeziwe libukeka kanjena:
Nansi indlela isixhumi esibonakalayo sesigaba esibukeka ngayo ngemuva kokudala isicelo sokudonsa:
Isinyathelo 9 Hlanganisa isicelo sokudonsa
Inkinobho eluhlaza “Hlanganisa isicelo sokudonsa” ngezansi idala isicelo sokudonsa. Ngemva kokuyichofoza, izinguquko ezenziwe zengezwa egatsheni eliyinhloko lephrojekthi.
Qaphela! Susa igatsha ngemuva kokuhlanganisa. Inani elikhulu lazo lingaholela ekudidekeni kuphrojekthi. Ukuze ususe igatsha, chofoza inkinobho empunga ethi “Susa igatsha” ekhoneni elingezansi kwesokudla.
Ukuhlola isimo samanje sokuzibophezela, chofoza kusixhumanisi esithi “Izibophezelo” ekhasini lokuqala lenqolobane. Ukuchofoza kuzobonisa lonke uhlu lwezibopho kuleli gatsha. Isithombe-skrini sibonisa ngqo leso esisanda kwakhiwa.
Ngakwesokudla kunekhodi ye-hashi yesibopho ngasinye. Ikhodi ye-hashi iyinkomba ehlukile engasetshenziswa lapho kuxhunywa ama-API nezinsizakalo zezinkampani zangaphandle. Ungaphinda ubhekisele ekuzinikeleni okuthile ngenombolo kamazisi enguqulweni yedeskithophu ye-Git Bash kulayini womyalo.
Isinyathelo 10Buyisela Izinguquko Ze-Github Emshinini Wasendaweni
Okwamanje, inqolobane ohlelweni lwe-Github ibukeka ihluke kancane kunomsebenzisi okukhompuyutha yendawo. Isibonelo, isibopho esenziwe umsebenzisi egatsheni lakhe siqu futhi wahlanganiswa negatsha eliyinhloko asikho emshinini wendawo. Ukuze uvumelanise ngokuzenzakalela izinguqulo ezihlukene zephrojekthi, kufanele usebenzise umyalo we-git pull origin master (uma usebenza egatsheni eliyinhloko) noma i-git pull.
getrekt:myproject getrekt $ git pull origin master
remote: Ukubala izinto: 1, kwenziwe.
okukude: Isamba esingu-1 (i-delta 0), ephinde yasetshenziswa 0 (delta 0), iphakethe-iphinde yasetshenziswa 0
Kusuka ku-https://github.com/cubeton/mynewrepository
* umphathi wegatsha -> FETCH_HEAD
23242..232433berer3444 master -> origin/master
getrekt. txt | Ifayela elingu- 1 +
1 lishintshiwe, okufakiwe okungu-1(+)Ukuhlola isimo samanje somyalo, thayipha ilogi ye-git kulayini womyalo. Izoklelisa zonke izibophezelo.
getrekt:myproject getrekt $ git log
commit 32dgt472hf74yh7734hf747fh373hde7r3heduer73hfhf
Merge: 3fg4dd 34fg3u7j7
Author: Mtdes Ethan < getrekt@yandex.ru>
Date: Fri Sep 11 17:48:11 2015 -0400
Merge /cubeton/mynewrepository commit
44hgfh7f74hdu9jt93hf9ifejffe
Author: Mtdes Ethan < getrekt @yandex.ru>
Idethi: Fri Jan 07 17:48:00 2021 -02356
bophezela 46thf9496hf9485hkf857tg9hfj8rh4j
Merge: 33fh5d 3689gfh
Umbhali: Mtdes Ethaandex 2: 2020 Jan07 – 2015 Jan07 – 2011 – 2011 – 2011 – 2011 – 2019 02 Dakt 19496: 2011 – 2014 0 0 0 6 0 0 1 0 6 0 6 0 6 0 6 0 6 0 6 0 6 0 6 0 1 – 2
: 6
commit 46thf9496hf9485hkf857tg9hfj8rh4j
Merge: 33fh5d 3689gfh
Author: Mtdes Ethan < getrekt@yandex.ru>
Date: Fri Jan 07 17:55:00 2021 -02356
Added some more text to my file
commit 355904-43hg940fg959hfg0g95jjgdgdfgf57i86f
Merge: 343fggdd 53efhgffddg
Author: Mtdes Ethan < getrekt@yandex.ru>
Usuku: Fri Jan 07 17:58:00 2021 -02356
Lokhu ukuzibophezela kwami kokuqala! Ilungile! Manje umsebenzisi usejwayelene nazo zonke izinhlobo zomsebenzi ohlelweni lokulawula inguqulo. Isifundo se-Git ne-GitHub sabaqalayo sendlela yokufaka i-Git futhi uqalise nge-Github, amagatsha, amakhosombe, ukuzibophezela neminye imiqondo ekusebenzeni kwe-GitHub: https://youtu.be/zZBiln_2FhM
Izici ezengeziwe ze-Github ne-Git
Ake sibheke amanye “ama-chips” awusizo azovumela unjiniyela ukuthi enze lula umsebenzi wokulawula inguqulo.
Ukuhlanganisa indawo yokugcina umshini wendawo
Iya endaweni yakho yokugcina ye-GitHub. Ekhoneni eliphezulu kwesokudla ngaphezu kohlu lwamafayela, vula imenyu yokudonsela phansi ethi “Clone noma landa”. Kopisha i-URL yekhophi ye-HTTPS.
Buyela ewindini le-Git Bash bese ufaka umyalo:
git clone repository_url
repository_url – I-URL yephrojekthi yamanje ezokwenziwa. Kunalokho, i-url yendawo yokugcina ifakiwe.
Esibonelweni esingenhla, umyalo uhlanganisa indawo yokugcina phezu kwe-HTTPS. Enye inketho ukwenza ama-URL ngaphezulu kokhiye be-SSH. Ukuze wenze lokhu, udinga ukukhiqiza ipheya yokhiye we-SSH ku-Windows futhi unikeze ukhiye womphakathi ku-akhawunti ye-GitHub.
Ukuthola amakhosombe akude
Ngemva kokuhlanganisa, ikhophi yenqolobane evela ku-GitHub kufanele ivele kuhla lwemibhalo olusebenzayo kukhompyutha. Iphrojekthi kufanele iqukathe uhla lwemibhalo olunegama namafayela ayinhloko. Ukuze ushintshele kuyo, udinga ukubhala umyalo olandelayo:
cd git_project
Qaphela: Faka esikhundleni i-git_project igama langempela lenqolobane elandiwe, noma ucacise okuqukethwe kuhla lwemibhalo lwamanje ngomyalo we-ls. Indlela yesibili isetshenziswa ezimeni lapho umsebenzisi engakwazi ukukhumbula igama lephrojekthi.
Inguqulo yedeskithophu ye-GitHub – yini i-GitHub Desktop, ukusebenza okuyinhloko, izici nenqubo yokufaka
I-GitHub Desktop iyisicelo sedeskithophu esihlinzeka ngokusebenzisana okusekelwe ku-GUI ne-GitHub. Ngokungafani ne-Git, inguqulo yedeskithophu ye-GitHub ikuvumela ukuthi wenze imiyalo efanayo usebenzisa isixhumi esibonakalayo somsebenzisi ngokuchofoza izinkinobho, okwenza kube lula kakhulu ukusebenza namakhosombe.
Indlela yokufaka
- Landela isixhumanisi – https://desktop.github.com/
- Qala ukulanda iphakheji yokufaka yohlelo.
- Chofoza kabili kusithonjana sefayela elilandiwe bese uqhubeke nokufaka i-Github Desktop.
- Yethula uhlelo ngokusebenzisa imenyu yokuqala.
- Ngena ngemvume ku-GitHub usebenzisa imininingwane ye-akhawunti yakho yomsebenzisi.
Ukusebenza okuyinhloko
- Ukudala, ukungeza kanye nokuhlanganisa izinqolobane.
- Ukusebenzisa uhlelo ukuphatha amathebhu ephrojekthi.
- Ukwenza izinguquko egatsheni.
- Ukudala izinkinga, ukudonsa izicelo kanye nokuzibophezela.
- Ikhono lokufinyelela izinguqulo zangaphambili zemikhiqizo emisha.
I-Github API
I-Github REST API iyisixhumi esibonakalayo esinikeza abathuthukisi ukufinyelela kudatha ye-Github, amaphrojekthi, namakhosombe, kanye nokuthumela izicelo zeseva. Isixhumanisi esithi https://api.github.com/ siqukethe wonke ama-URL ongathumela kuwo izicelo ezilula ze-GET:
Ngokuvamile, onjiniyela badala izicelo ngolimi lohlelo lwePython ngefomethi ye-JSON. Okokuqala udinga ukuthola ulwazi oluyisisekelo mayelana nenqolobane kusukela kusixhumanisi – https://api.github.com/user/repos Ulwazi oluyisisekelo lufakwa kufayela lokumisa ngefomethi ye-JSON. Iqukethe imingcele eyinhloko mayelana nomsebenzisi – i-avatar, abafundi, inombolo yamakhosombe, okulandiwe, njll. Le datha ibe idluliselwa kuseva.
Ukuphatha nokulungiselela amaphrojekthi we-Github Desktop
Ngemva kokufaka, ukubhalisa i-akhawunti, nokusetha uhlelo lokusebenza, umsebenzisi angaqala ukusebenzisa uhlelo lwe-GitHub.
Ukudala, ukungeza kanye nokuhlanganisa inqolobane
Ukwakha inqolobane entsha, khetha “Ifayela” bese uchofoza inkinobho ethi “Dala indawo yokugcina”. Ukwengeza iphrojekthi yendawo, khetha imenyu ethi “Ifayela” bese uchofoza inkinobho ethi “Engeza Indawo Yokugcina Yasendaweni”. Ukuze wenze i-cloning, kufanele ukhethe imenyu ethi “Ifayela” – “I-Clone repository”.
Ukudala Igatsha Elisha
Ukuze wakhe igatsha lephrojekthi elihlukile, vula ingxenye Yegatsha Lamanje bese uchofoza inkinobho Yegatsha Elisha. Umsebenzisi uzokwazi ukubona igatsha kusixhumi esibonakalayo se-GitHub futhi enze isicelo sokudonsa ukuze alandelele izinguquko.
Ukuphepha
Ideskithophu kanye nenguqulo yewebhu ye-Github ikuvumela ukuthi ulungiselele futhi ukhuphule izinga lokuvikeleka le-akhawunti yomsebenzisi. Konke ukusebenza kuyatholakala esigabeni “sezilungiselelo zokuphepha zesitoreji”. Kuyafaneleka ukucatshangelwa ngokuningiliziwe.
Ukulungiselelwa kwenqubomgomo yezokuphepha
Ekhasini eliyinhloko lenqolobane yakho, chofoza:
- “Ukuphepha” – “Inqubomgomo Yezokuphepha” – “Qala Ukusethwa”.
- Engeza ulwazi mayelana nezinguqulo ezisekelwayo zephrojekthi yakho nokuthi ungabika kanjani ubungozi obungaba khona.
Ukuphathwa Kwegrafu Yokuncika
Igrafu yokuncika ikhiqizwa ngokuzenzakalelayo kuwo wonke amaqoqo omphakathi, kodwa asikho isici esinjalo samaqoqo ayimfihlo. Igrafu ikhomba konke ukugeleza kokuncika okuphumayo futhi ikuvumela ukuthi ubone ubungozi kuphrojekthi. Ukuze usethe igrafu yokuncika, chofoza “Izilungiselelo” – “Ukuphepha Nokuhlaziya”. Ngokuphikisana negrafu, chofoza okuthi “Vumela” noma “Khubaza”.
Amalayisense
Ilayisensi ye-Github ihlinzeka ngokusetshenziswa kwezinhlobo ezimbili eziyinhloko
zamalayisense :
- I-GPL iwuhlobo lwelayisensi evumela abanye abasebenzisi ukuthi basebenzise umsebenzi womunye umuntu kweminye imiklamo yomthombo ovulekile. Nokho, izinkampani zezentengiselwano azikwazi ukwenza lokhu.
- I- LGPL/Commons/MIT/Apache , njll. – umsebenzisi unikeza ikhodi yakhe ukuze ayisebenzise mahhala. Abanye bangenza imali ngayo.
[i-id yamagama-ncazo = “okunamathiselwe_12364″ align=”aligncenter” width=”698″]
Lapho kucaciswe khona uhlobo lwelayisense ye-GitHub[/caption] Sibuyekeze ukusebenza okuyinhloko kwesevisi yefu ye-Github kanye nohlelo lokusebenza namakhosombe we-Git Bash . Isinyathelo ngesinyathelo sikhulume ngendlela yokwakha iphrojekthi egcwele ohlelweni lokulawula inguqulo.