Yintoni i-GitHub, kutheni ifuneka kwaye uyisebenzise njani i-GitHub, indlela yokuqalisa ukusebenzisa inkonzo – isikhokelo sabaqalayo.
- Yintoni i-GitHub kwaye uqalise njani-Isikhokelo sabaQalayo
- I-Git kunye ne-GitHub-yintoni umahluko, ukuqhelana kuqala ne-Git kunye ne-GitHub
- Yintoni iGit?
- Yintoni i-GitHub?
- Ngowuphi umahluko ophambili?
- Iinyani ezinomdla malunga neGithub
- Iimpawu zeGithub
- Isebenza njani iGitHub, Iimpawu
- Ifolokhwe
- Tsala izicelo
- Ukudibanisa
- Isikhokelo-ungaqala njani kwiGithub ukusuka ekuqaleni
- Inyathelo 0Faka iGit kwaye wenze iAkhawunti yeGitHub
- Inyathelo 1: Qalisa iGit kwaye wenze indawo yokugcina yasekhaya
- Inyathelo 2. Yenza ifayile entsha kwindawo yokugcina
- Inyathelo 3: Yongeza ifayile kwindawo yokubeka umkhondo
- Inyathelo 4 Yenza isibophelelo
- Inyathelo lesi-5. Yenza isebe elitsha lesebe
- Inyathelo 6Yenza iNdawo entsha yeGitHub
- Inyathelo lesi-7: Ukutyhala iSebe leProjekthi kwi-GitHub
- Ukongeza
- Inyathelo 8. Yenza isicelo sokuqala sokutsala
- Inyathelo 9 Hlanganisa isicelo sokutsala
- Inyathelo 10Buyisela iinguqu zeGithub kuMatshini weNdawo
- Iimpawu ezongezelelweyo zeGithub kunye neGit
- Ukuvala indawo yokugcina kumatshini wendawo
- Ukufumana iindawo zokugcina ezikude
- Inguqulo ye-desktop ye-GitHub – yintoni i-GitHub Desktop, umsebenzi oyintloko, iimpawu kunye nenkqubo yokufakela
- Indlela yokufaka
- Ukusebenza okungundoqo
- Github API
- Ukulawula kunye nokuqwalasela iiprojekthi zeDesktop zeGithub
- Ukudala, ukongeza kunye nokudibanisa indawo yokugcina
- Ukwenziwa kweSebe Elitsha
- Ukhuseleko
- Ukusetwa komgaqo-nkqubo wokhuseleko
- ULawulo lweGrafu yokuxhomekeka
- Iilayisensi
Yintoni i-GitHub kwaye uqalise njani-Isikhokelo sabaQalayo
I-GitHub yi-portal ye-intanethi apho abaphuhlisi kunye nabadwelisi beprogram banokulayisha ikhowudi abayenzayo kwaye basebenze kunye ukuyiphucula. Uphawu lweGitHub yinkqubo yayo yolawulo oluluqilima. Ulawulo lwenguqulelo luvumela abadwelisi benkqubo ukuba benze isoftware ngokwezifiso ngaphandle kokubeka esichengeni isoftware ngokwayo. Utshintsho olucetywayo lunokudityaniswa ngokulula lube lukhululo olupheleleyo, kodwa kuphela emva kokuba zonke iinguqu ziye zahlaziywa kwaye zamkelwa.
I-Git kunye ne-GitHub-yintoni umahluko, ukuqhelana kuqala ne-Git kunye ne-GitHub
Yintoni iGit?
Impendulo: Inkqubo yokulawula inguqulo ekhawulezayo kunye ne-scalable . I-Git yinkqubo yolawulo yohlaziyo esimahla nevulekileyo eyenzelwe ukuba ikhawuleze kwaye isebenze kuyo nayiphi na iprojekthi, ukusuka kwencinci ukuya kwenkulu kakhulu.
Yintoni i-GitHub?
Impendulo: inkonzo yefu enamandla yokulawula uphuhliso lwabucala kunye neeprojekthi zomthombo ovulekileyo.
Ngowuphi umahluko ophambili?
I-Git yisoftware egcwele ngokupheleleyo kudidi lwenkqubo yoguqulelo, efakwe kwikhompyuter yomsebenzisi. I-Git ikuvumela ukuba wenze utshintsho kwikhowudi ngokusebenzisa umgca womyalelo (Microsoft PowerShell), kwaye i-GitHub inikezela ngokukwazi ukugcina iiprojekthi ekufikeleleni koluntu.
Iinyani ezinomdla malunga neGithub
- Elona nani liphezulu labasebenzisi kwisiza kulo nyaka uphelileyo (ngokwezibalo ngoJulayi 24, 2021) yayingabantu abazizigidi ezingama-45.
- Ngo-2018, iMicrosoft yafumana i-GitHub nge-7.5 yeebhiliyoni zeedola.
- Kukho umthombo ovulekileyo wegit repository kwiGithub. Nabani na angenza utshintsho kuyo. Iprojekthi iyafumaneka kwikhonkco – https://github.com/git/git?ref=stackshare
![Yintoni i-Github, indlela yokuyisebenzisa, indlela yokwenza iprojekthi, ukulawula nokuqwalasela](https://articles.opexflow.com/wp-content/uploads/2022/01/rep.jpg)
Iimpawu zeGithub
- Ukukwazi ukudibanisa kunye neeplatifomu ezidumileyo kunye neenkonzo-i-Amazon, i-Google Cloud kunye ne-Code Climate.
- Inkxaso kwiilwimi zokuprograma ezingaphezu kwama-200.
- Inqanaba eliphezulu lokuzinzisa kunye “nomanyano lwemibutho”. Xa umsebenzisi epapasha iprojekthi yakhe kwiGitHub, lonke uluntu lwenkqubo lunokukhuphela kwaye luvavanye umsebenzi, umgangatho wekhowudi, kunye nenqanaba lobuchwephesha bayo. Abasebenzisi beqela lesithathu banokulumkisa umnini weprojekthi malunga neengxaki ezinokwenzeka, iingxabano eziguquguqukayo, njl.
Isebenza njani iGitHub, Iimpawu
Ezintathu zezona mpawu zibalulekileyo zeGithub zi-branching, ukutsala izicelo, kunye nokudibanisa. Kufanelekile ukuqwalasela umsebenzi ngamnye ngokwahlukileyo.
Ifolokhwe
Ukufohla iprojekthi kudala ikopi (ifolokhwe) evumela umsebenzisi ukuba azame ngokukhululekileyo ngaphandle kokuchaphazela iprojekthi yokuqala. Yenza iifolokhwe kwaye utsale izicelo: https://youtu.be/nT8KGYVurIU
Tsala izicelo
Isicelo sokutsala sipapashwa ngumphuhlisi emva kokugqiba ukusebenza ukulungisa / ukutshintsha ikhowudi. Ngelo xesha, umnini weprojekthi ngokwakhe unokuphonononga utshintsho olwenziwe kwaye abuze nayiphi na imibuzo eyongezelelweyo.
Ukudibanisa
Emva kokuba umniniyo avume isicelo sokutsala, badibanisa isicelo sokutsala kwaye basebenzise utshintsho kwiprojekthi edibeneyo kwikhowudi yomthombo.
Isikhokelo-ungaqala njani kwiGithub ukusuka ekuqaleni
Esi sikhokelo sifanelekile kubo bonke abaqalayo abaqala ukufunda iGit kunye neGithub. La manyathelo alandelayo aya kukunceda ukuba wakhe inkqubo efanelekileyo yokusebenza nale software. Uya kufunda ukwenza utshintsho kwi-codebase, vula isicelo sokutsala (yenza isicelo sokutsala), kwaye udibanise ikhowudi kwisebe eliphambili. Ngoko masiqalise.
Inyathelo 0Faka iGit kwaye wenze iAkhawunti yeGitHub
- Yiya kwiwebhusayithi yeGit esemthethweni: https://git-scm.com/downloads
- Cofa kwikhonkco ukukhuphela uguqulelo lwedesktop yeGit yeWindows kwaye ulinde ukukhuphela ukugqibezela.
- Khipha kwaye usebenzise i-installer ye-Git ngokucofa kabini ifayile ye-Git.exe.
- Vumela usetyenziso lwenze utshintsho kwiPC ngokucofa iqhosha elithi “Ewe” kwibhokisi yencoko yababini ethi “Ulawulo lweAkhawunti Yomsebenzisi” evulayo.
- Qala inkqubo yokufaka iGit. Funda uxwebhu lweLayisensi kaWonke-wonke ye-GNU kwaye ucofe Okulandelayo.
- Chaza indawo yokufakela inkqubo, okanye ushiye amaxabiso angagqibekanga. Udweliso lwenkqubo luya kukukhuthaza ukuba wenze ifolda yemenyu yokuQala. Tsiba le nto.
- Khetha umhleli wombhalo ofuna ukuwusebenzisa ngeGit. Kwifestile eyehlayo, khetha i-Notepad ++ (okanye nawuphi na omnye umhleli wombhalo owakhe wasebenza naye ngaphambili) kwaye ucofe u-“Okulandelayo”.
- Chaza igama lesebe leprojekthi entsha. Ixabiso elimiselweyo ngu “master”. Kuyacetyiswa ukuba ushiye olu cwangciso kwindawo emiselweyo.
- Kwiinketho zokukhetha UMENDO, umxhasi we-SSH, izatifikethi zeseva, iziphelo zomgca kunye ne-terminal, shiya yonke into njengoko injalo kwaye ucofe iqhosha elithi “Okulandelayo”.
- Shiya zonke iisetingi ezingagqibekanga kwaye uqalise ukuhlohla inkqubo.
- Nje ukuba ufakelo lugqityiwe, jonga iibhokisi ukujonga amanqaku okukhululwa kwaye uqalise iGit Bash. Vala ifestile yomfaki.
Ungabhalisa iakhawunti kwiGithub usebenzisa eli khonkco lilandelayo: https://github.com/join. Ukwenza oku, kufuneka ufake idatha yobhaliso esisiseko efunekayo kwixa elizayo ukuze uqinisekise iakhawunti yakho.
Inyathelo 1: Qalisa iGit kwaye wenze indawo yokugcina yasekhaya
I-Git ineendlela ezimbini zokusetyenziswa-i-bash (i-Git Bash) kunye nojongano lomsebenzisi wegraphical (Git GUI). Ukuqala iGit Bash, vula imenyu yokuQala – Windows, chwetheza i-git bash kwaye ucinezele u-Enter (okanye ucofe kabini ekhohlo kwindlela emfutshane yenkqubo). Ukuqalisa iGit GUI, vula imenyu yokuQala-Windows, chwetheza i-git gui kwaye ucinezele u-Enter. Kwimeko yethu, siya kusebenzisa iGit Bash.
getrekt:Desktop getrekt $ cd ~/Desktop
getrekt:Desktop getrekt $ mkdir myproject
getrekt:Desktop getrekt $ cd myproject/
Umyalelo we- mkdir wenza incwadi eneenkcukacha yeprojekthi yobulali. Yenza indawo yethu yokuqala yeGithub: https://youtu.be/yHCUc6cmhcc
Inyathelo 2. Yenza ifayile entsha kwindawo yokugcina
Kwifolda yeprojekthi, yongeza ifayile yokubhaliweyo entsha usebenzisa umyalelo wokuchukumisa. Ngendlela eqhelekileyo, umyalelo uya kudala ifayile yokubhaliweyo engenanto eya kuba nolwandiso lwe-.txt.
Ingqalelo! I-Git igcina/ilawula utshintsho kuphela kwiifayile ezizilandelayo. Emva kokudala ifayile entsha, umsebenzisi unokulandelela imeko yayo esebenzisa i-git status command. I-console iya kunika uluhlu lweefayile ezikhoyo kwindawo yokugcina.
Nje ukuba ungeze ifayile kwifolda equlethe i-git repository, inkqubo iya kuqaphela utshintsho ngaphakathi kwiprojekthi. Nangona kunjalo, ukulandelela okuzenzekelayo akuyi kwenziwa, kufuneka usebenzise umyalelo okhethekileyo kule – git add.
getrekt:myproject getrekt $ touch getrekt.txt
getrekt:myproject getrekt $ ls
getrekt.txt
Inyathelo 3: Yongeza ifayile kwindawo yokubeka umkhondo
Yongeza ifayile kwindawo yeqonga kunye nomyalelo wokongeza we-git.
getrekt:myproject git yongeza. Ngalo myalelo, inkqubo iya kuqalisa ukulandelela ngokuzenzekelayo zonke iifayile eziya kwenziwa kwifolda yeprojekthi. Unokujonga ukuba umyalelo usebenza kunye ne-git status. Le yindlela iilog ezijongeka ngayo kwilayini yomyalelo yeGit Bash emva kokuchwetheza ubume
begit: getrekt: getrekt getrekt$ git status Kumphathi wesebe Isibophelelo sokuqala Utshintsho luzibophelele
:
(
sebenzisa
“git rm –cached …” ukukhulula)
Ifayile
entsha yongeziweyo Igama lefayile entsha: getrekt.txt
ifayile entsha: getrekt.txt Ilog yegama: Ifayile ayikabotshwa , kodwa sele iza kongezwa.
Inyathelo 4 Yenza isibophelelo
Ukuzibophelela yindawo yokukhangela kuyo nayiphi na indawo yokugcina. Ukubeka nje, iphakheji yokutshintsha egcina ulwazi malunga neefayile ezongeziweyo, ezihleliweyo okanye ezicinyiweyo ezigcina ikhowudi ethile.
getrekt:myproject getrekt $ git commit -m “YAM YOKUQALA ABAFANA BAM!”
[inkosi (engcambu-zibophelele) b345d9a] UKUZINIKELA KWAM KOKUQALA!
1 ifayile etshintshiweyo, 1 ufakelo(+)
imo yokudala 100644 getrekt.txt
Umyalelo wokwenza isibophelelo yi-git commit -m “Zibophelele igama”.
Ingqalelo! Umyalezo osekupheleni komyalelo kufuneka ube nentsingiselo kwaye uqondeke kwabanye abaphuhlisi beprojekthi. Ungazibizi izibophelelo zakho njenge “asdfadsf” okanye “foobar”. Ngaphandle koko, akukho mntu uya kuqonda nantoni na, kwaye kuya kufuneka uchithe ixesha elininzi uzicima.
Inyathelo lesi-5. Yenza isebe elitsha lesebe
Isebe elitsha licandelo elipheleleyo leprojekthi, eliquka zonke iiseti zokuzibophelela. Imele ukukhutshwa okwahlukileyo kwemveliso, kodwa ngaphakathi kwenkqubo yolawulo loguqulelo. Amasebe avumela umsebenzisi ukuba ahambe phakathi “kwelizwe” leprojekthi.
Kuxwebhu olusemthethweni lwe-git, inkcazo yamasebe ithi: “Isebe e-Git kunye ne-Github sisalathiso esinokususwa kwesinye sezenzo zokugcina.”
Umzekelo, ukuba umsebenzisi wayefuna ukongeza iphepha elitsha kwiwebhusayithi yabo, baya kuba nakho ukwenza isebe elitsha nje ngelo phepha ngaphandle kokuchaphazela umzimba oyintloko weprojekthi. Ngokukhawuleza xa egqibile ngayo, unokudibanisa utshintsho olusuka kwisebe lakhe ukuya kwelona liphambili. Kwimeko yesebe elitsha, i-Git igcina umkhondo we-branched evela kuyo.
getrekt:myproject getrekt $ git
inkosi yesebe
* yam-entsha- sebe okwangoku.
Qaphela: Ngokungagqibekanga, isebe lokuqala le-git repo nganye libizwa ngokuba “yinkosi” (kwaye lidla ngokusetyenziswa njengenkosi kwiprojekthi). Njengenxalenye yokulwa ubuhlanga, abanye abaphuhlisi baqalisile ukusebenzisa amanye amagama kwisebe elingagqibekanga, elifana ne “primary”. Nangona kunjalo, rhoqo kunokuba kungenjalo, abasebenzisi banokubona “inkosi” okanye amagama afanayo asetyenziselwa ukubhekisela kuyo.
Kufanelekile ukukhumbula ukuba phantse yonke indawo yokugcina inendawo yogcino lwesebe enokuthi ithathelwe ingqalelo njengenguqulelo esemthethweni yeprojekthi. Ukuba yiwebhusayithi, ke isebe yinguqulelo ebonwa ngabasebenzisi. Ukuba sisicelo, ke isebe eliphambili kukukhululwa abasebenzisi abafake kwikhompyuter yabo okanye kwisixhobo esiphathwayo. Yile ndlela uguqulelo lwemveli lweemveliso zeGit kunye neGithub zisebenza. Indawo esemthethweni inamaxwebhu aneenkcukacha ezithe kratya ekusebenziseni amagama ahlukeneyo amiselweyo esebe. Ulwazi luyafumaneka kwi-Github ku-https://github.com/github/renaming
Inyathelo 6Yenza iNdawo entsha yeGitHub
Eli nyathelo alifunwa ukuba ufuna ukujonga ikhowudi yakho kuphela ekuhlaleni. Kodwa ukuba usebenza kwiqela kwaye wamkela utshintsho oluvela kwabanye abadwelisi benkqubo, ngoko unokusebenzisa amandla akhoyo eGitHub ukutshintsha ngokudibeneyo ikhowudi yeprojekthi. Ukwenza indawo yokugcina entsha kwi-GitHub, kufuneka ungene kwinkqubo kwaye uye kwiphepha eliphambili lesayithi. Ukusuka kwimenyu ephambili, cofa kwiqhosha elithi “Indawo eNtsha”, ebekwe phantsi kophawu “+” ecaleni kwefoto yeprofayile kwikona ephezulu ngasekunene yebar yokukhangela: Emva kokucofa iqhosha, iGitHub iya kubuza umnini weprojekthi. ukubiza indawo yokugcina kunye nokubonelela ngengcaciso emfutshane:
Ingqalelo! Ukhuphelo logcino lwendawo lunokwenzeka kusetyenziswa ilayini yomyalelo, kwaye ngakumbi imiyalelo git ekude yongeza imvelaphi github_url (yenza irekhodi yoqhagamshelwano olutsha kwindawo yokugcina ekude), git push -u origin master (iseka uxhulumaniso phakathi kwesebe kwi apho umphuhlisi akhoyo kunye nesebe eliphambili kwiseva ekude).
Nantsi indlela iilog ezijongeka ngayo kumgca womyalelo weGit Bash:
getrekt:myproject getrekt $ git remote yongeza imvelaphi https://github.com/cubeton/mynewrepository.git
getrekt:myproject getrekt $ git push -u imvelaphi inkosi
Ukubala izinto: 3, yenziwe.
Izinto zokubhala: 100% (3/3), 263 bytes | 0 bytes/s, yenziwe.
Iyonke isi-3 (i-delta 0), iphinde isetyenziswe 0 (i-delta 0)
Ukuya ku-https://github.com/cubeton/mynewrepository.git
* [isebe elitsha] inkosi -> inkosi
yeSebe i-master imiselwe ukulandelela inkosi yesebe ekude ukusuka kwimvelaphi.
Inyathelo lesi-7: Ukutyhala iSebe leProjekthi kwi-GitHub
Isebe elitsha leprojekthi kunye nendawo yokugcina yenziwe. Kuhlala “ukutyhala” isebe kwaye uyithumele kwindawo entsha yokugcina i-Github. Ngale ndlela, amalungu oluntu wesithathu aya kukwazi ukubona ikhowudi kwaye enze utshintsho kuyo. Ukuba uhlaziyo luvunyiwe, umnini weprojekthi unokudibanisa utshintsho kwinguqu ephambili yeprojekthi. Ukutyhala utshintsho kwisebe elitsha kwi-GitHub, kufuneka ufake i-git push command kumgca womyalelo. I-GitHub izakwenza ngokuzenzekelayo isebe kwindawo yokugcina ekude:
getrekt:myproject getrekt$ git push imvelaphi yam-entsha-sebe
Ukubala izinto: 3, kwenziwe.
Uxinzelelo lweDelta usebenzisa ukuya kuthi ga kwimisonto eyi-8.
Ukucinezela izinto: 100% (2/2), yenziwe.
Izinto zokubhala: 100% (3/3), 313 bytes | 0 bytes/s, yenziwe.
Iyonke 3 (delta 0), iphinde yasetyenziswa 0 (delta 0)
Ukuya ku-https://github.com/cubeton/mynewrepository.git
* [isebe elitsha] my-new-branch -> my-new-branch Emva kokuhlaziya iphepha le-GitHub, umsebenzisi uya kubona isebe elitsha elityhalelwe ngaphakathi. indawo yokugcina.
Ukongeza
Lithetha ukuthini igama elithi imvelaphi kumyalelo wemvelaphi ye-git? Xa umsebenzisi ehlanganisa indawo yokugcina ekude kumatshini wabo wasekhaya, i-git yenza i-alias eqhelekileyo kuyo phantse kuzo zonke iimeko, “imvelaphi”, eyona nto imfutshane ye-URL yendawo yokugcina ekude. Ngenisa iprojekthi kwi-GitHub: https://youtu.be/zM6z57OtR2Q
Inyathelo 8. Yenza isicelo sokuqala sokutsala
Isicelo sokutsalwa (okanye isicelo sokutsalwa) yindlela yokulumkisa abanini bendawo ukuba umphuhlisi ufuna ukwenza utshintsho oluthile kwikhowudi. Yile ndlela iphepha elinesicelo sokutsala esongeziweyo lijongeka ngolu hlobo:
Inyathelo 9 Hlanganisa isicelo sokutsala
Iqhosha eliluhlaza “Dibanisa isicelo sokutsala” ezantsi lenza isicelo sokutsalwa. Emva kokuyicofa, utshintsho olwenziweyo longezwa kwisebe eliphambili leprojekthi.
Ingqalelo! Cima isebe emva kokudibanisa. Inani elikhulu labo lingakhokelela ekubhidekeni kwiprojekthi. Ukucima isebe, cofa iqhosha elingwevu elithi “Cima isebe” kwikona esezantsi ekunene.
Inyathelo 10Buyisela iinguqu zeGithub kuMatshini weNdawo
Okwangoku, indawo yokugcina kwi-Github system ibonakala ihluke kancinci kunomsebenzisi kwikhompyuter yendawo. Umzekelo, isibophelelo asenze umsebenzisi kwisebe labo kwaye wadityaniswa kwi-master branch asikho kumatshini wendawo. Ukulungelelanisa ngokuzenzekelayo iinguqulelo ezahlukeneyo zeprojekthi, kufuneka usebenzise i-git pull origin master command (xa usebenza kwi-master branch) okanye i-git pull.
getrekt:myproject getrekt $ git tsala imvelaphi inkosi
ekude: Ukubala izinto: 1, kwenziwe.
kude: Iyonke i-1 (i-delta 0), isetyenziswe kwakhona i-0 (i-delta 0), ipakethe-isetyenziswe kwakhona 0
Ukusuka ku-https://github.com/cubeton/mynewrepository
* umphathi wesebe -> FETCH_HEAD
23242..232433berer3444 master -> imvelaphi/master
getrekt. txt | 1 +
1 ifayile etshintshiweyo, 1 ufakelo(+)Ukujonga imeko yangoku yomyalelo, chwetheza i-git log kumgca womyalelo. Iya kudwelisa zonke izibophelelo.
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>
Umhla: NgoLwesihlanu uJan 07 17:48:00 2021 -02356 uzibophelele
46thf9496hf9485hkf857tg9hfj8rh4j Dibanisa
: 33fh5d 3689gfh
Umbhali: Mtdes Ethaandex 20: 2 Jan070: 2011 Jan07 – 2011 Jan07 – getru Dakt10: 2 getru Dakt10
: 2019496h.
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>
Umhla: Fri Jan 07 17:58:00 2021 -02356
Oku kukuzinikela kwam kokuqala! Ulungile! Ngoku umsebenzisi uqhelene nazo zonke iintlobo zomsebenzi kwinkqubo yolawulo lwenguqulelo. I-Git kunye ne-GitHub yokufundisa yabaqalayo malunga nokufaka i-Git kwaye uqalise nge-Github, amasebe, iindawo zokugcina, ukuzinikela kunye nezinye iikhonsepthi kwi-GitHub practice: https://youtu.be/zZBiln_2FhM
Iimpawu ezongezelelweyo zeGithub kunye neGit
Makhe sijonge ezinye “iitshiphu” eziluncedo eziza kuvumela umphuhlisi ukuba enze lula umsebenzi kulawulo loguqulelo.
Ukuvala indawo yokugcina kumatshini wendawo
Yiya kwindawo yakho yokugcina yeGitHub. Kwikona ephezulu ngasekunene ngaphezulu koluhlu lweefayile, vula i-“Clone okanye khuphela” imenyu yokuhla. Khuphela i-URL yekopi ye-HTTPS.
git clone repository_url
repository_url – URL yeprojekthi yangoku eza kwenziwa. Endaweni yoko, i-url yendawo yokugcina ifakiwe.
Kumzekelo ongasentla, umyalelo udibanisa indawo yokugcina phezu kwe-HTTPS. Enye inketho kukudibanisa nee-URL ngaphezulu kwezitshixo ze-SSH. Ukwenza oku, kufuneka uvelise iqhosha le-SSH kwi-Windows kwaye unike isitshixo sikawonkewonke kwi-akhawunti ye-GitHub.
Ukufumana iindawo zokugcina ezikude
Emva kokudibanisa, ikopi yendawo yokugcina esuka kwi-GitHub kufuneka ivele kuluhlu olusebenzayo kwikhompyutheni. Iprojekthi kufuneka iqulathe uvimba weefayili onegama kunye neefayile eziphambili. Ukuze utshintshele kuyo, kufuneka ubhale lo myalelo ulandelayo:
cd git_project
Qaphela: Faka endaweni ye-git_project ngegama lokwenyani lendawo yokugcina ekhutshelweyo, okanye uchaze imixholo yolawulo lwangoku ngomyalelo we-ls. Indlela yesibini isetyenziswe kwiimeko apho umsebenzisi akakwazi ukukhumbula igama leprojekthi.
Inguqulo ye-desktop ye-GitHub – yintoni i-GitHub Desktop, umsebenzi oyintloko, iimpawu kunye nenkqubo yokufakela
I-GitHub Desktop sisicelo sedesktop esibonelela ngonxibelelwano olusekwe kwi-GUI kunye ne-GitHub. Ngokungafaniyo ne-Git, i-desktop version ye-GitHub ikuvumela ukuba wenze imiyalelo efanayo usebenzisa ujongano lomsebenzisi ngokucofa amaqhosha, okwenza kube lula kakhulu ukusebenza ngogcino.
Indlela yokufaka
- Landela ikhonkco- https://desktop.github.com/
- Qala ukukhuphela iphakheji yofakelo lwenkqubo.
- Cofa kabini kwi icon yefayile ekhutshelweyo kwaye uqhubeke nokufakwa kweGithub Desktop.
- Qalisa inkqubo ngokusebenzisa i Qala menu.
- Sayina ungene kwi-GitHub usebenzisa iinkcukacha zeakhawunti yakho yomsebenzisi.
Ukusebenza okungundoqo
- Ukudala, ukongeza kunye nokudibanisa iindawo zokugcina.
- Ukusebenzisa inkqubo ukulawula iithebhu zeprojekthi.
- Ukwenza utshintsho kwisebe.
- Ukwenza imiba, ukutsala izicelo kunye nokuzibophelela.
- Ukukwazi ukufikelela kwiinguqulelo zokuqala zeemveliso ezintsha.
Github API
I-Github REST API lujongano olubonelela abaphuhlisi ngokufikelela kwidatha yeGithub, iiprojekthi, kunye neendawo zokugcina, kunye nokuthumela izicelo zeseva. Ikhonkco https://api.github.com/ iqulethe zonke ii-URL onokuthumela kuzo ezona zicelo zilula ze-GET:
Ukulawula kunye nokuqwalasela iiprojekthi zeDesktop zeGithub
Emva kokufaka, ukubhalisa i-akhawunti, kunye nokuseta isicelo, umsebenzisi unokuqalisa ukusebenzisa inkqubo yeGitHub.
Ukudala, ukongeza kunye nokudibanisa indawo yokugcina
Ukwenza indawo yokugcina entsha, khetha “Ifayile” kwaye ucofe iqhosha elithi “Yenza indawo yokugcina”. Ukongeza iprojekthi yendawo, khetha imenyu ethi “Ifayile” kwaye ucofe iqhosha elithi “Yongeza indawo yokugcina indawo”. Ukwenza i-cloning, kufuneka ukhethe imenyu “Ifayile” – “i-Clone repository”.
Ukwenziwa kweSebe Elitsha
Ukwenza isebe leprojekthi elahlukileyo, vula icandelo leSebe Langoku kwaye ucofe iqhosha leSebe Elitsha. Umsebenzisi uya kuba nakho ukubona isebe kwi-interface ye-GitHub kwaye enze isicelo sokutsala ukulandelela utshintsho.
Ukhuseleko
Idesktop kunye noguqulelo lwewebhu yeGithub ikuvumela ukuba uqwalasele kwaye unyuse inqanaba lokhuseleko lweakhawunti yomsebenzisi. Yonke imisebenzi ifumaneka kwicandelo “lokhuseleko lokugcinwa”. Kufanelekile ukuqwalasela ngokubanzi.
Ukusetwa komgaqo-nkqubo wokhuseleko
Kwiphepha eliphambili lendawo yakho yokugcina, cofa:
- “Ukhuseleko” – “Umgaqo-nkqubo woKhuseleko” – “Qalisa ukuSeta”.
- Yongeza ulwazi malunga neenguqulelo ezixhaswayo zeprojekthi yakho kunye nendlela yokuxela ubuthathaka obunokwenzeka.
ULawulo lweGrafu yokuxhomekeka
Igrafu yokuxhomekeka iveliswa ngokuzenzekelayo kuzo zonke iindawo zokugcina zikawonke-wonke, kodwa akukho phawu lunjalo lweendawo zokugcina zabucala. Igrafu ichonga konke ukuhamba kokuxhomekeka okuphumayo kwaye ikuvumela ukuba uchonge ubuthathaka kwiprojekthi. Ukuseta igrafu yokuxhomekeka, nqakraza kwi “Settings” – “Security and Analysis”. Ngokuchasene negrafu, cofa u-“Enable” okanye “Disable”.
![Yintoni i-Github, indlela yokuyisebenzisa, indlela yokwenza iprojekthi, ukulawula nokuqwalasela](https://articles.opexflow.com/wp-content/uploads/2022/01/image017.gif)
Iilayisensi
Ilayisensi yeGithub ibonelela ngokusetyenziswa kweentlobo ezimbini eziphambili
zelayisensi :
- I-GPL luhlobo lwelayisensi evumela abanye abasebenzisi ukuba basebenzise umsebenzi womnye umntu kwezinye iiprojekthi zomthombo ovulekileyo. Nangona kunjalo, iinkampani zorhwebo azikwazi ukwenza oku.
- LGPL/Commons/MIT/Apache , njl – umsebenzisi unika ikhowudi yakhe yokusetyenziswa kwamahhala. Abanye banokwenza imali ngayo.