Bere a edi kan a wobɛyɛ biribi no yɛ nea ɛyɛ den bere nyinaa. Suro a wusuro sɛ wubedi mfomso no nyɛ nea ahotɔ wom koraa, titiriw bere a woreyɛ biako no. Nanso wiase a ɛwɔ open source no fa adwumayɛkuw ne adwuma a wɔbɛyɛ sɛ kuw ho. Enti, yɛpɛ sɛ yɛma ɔkwan a wɔfa so ma wɔn a wɔde mmoa foforo kɔ open source no yɛ mmerɛw denam sɛnea wobɛkyerɛkyerɛ wo sɛnea wode wo ntoboa a edi kan bɛma no so.
Nsɛm ne nkyerɛkyerɛ akenkan betumi aboa, nanso dɛn na eye sen sɛ wobɛbɔ mmɔden a wunsuro sɛ wubedi mfomso? Saa dwumadie yi botaeɛ ne sɛ ɛbɛma akwankyerɛ na ama sɛdeɛ wɔn a wɔrefi aseɛ no de wɔn ntoboa a ɛdi kan de ma no ayɛ mmerɛ. Kae:dodow a wo ho adwo wo no, dodow no ara na wusua ade yiye.Sɛ wopɛ sɛ wode wo ntoboa a edi kan ma a, di anammɔn a ɛwɔ ase ha no akyi kɛkɛ.
Sɛ wo nni Git wɔ wo kɔmputa so a, . fa hyɛ wo kɔmputa so.
Fork saa adekorabea yi denam fork button a ɛwɔ kratafa no atifi a wobɛma so. Wei bɛma woanya akoraeɛ no bi wɔ wo akonta so.
Afei clone saa akoraeɛ yi kɔ wo kɔmputa so. Klik clone button no so na afei klik kɔpi kɔ clipboard so icon no so.
Bue ahyɛdeɛ kwan (sɛ wowɔ Windows so) anaa terminal (sɛ wowɔ MacOS anaa Linux so) na yɛ git ahyɛdeɛ a ɛdidi soɔ yi:
git clone "URL a woayɛ ho kɔpi nkyɛe no"
baabi a "URL a woayɛ ho kɔpi seesei ara" (a nsɛm a wɔafa aka no nka ho) yɛ akoraeɛ URL.
Nhwɛsoɔ:
git clone https://github.com/your-username/first-contributions.git
baabi a wo-ɔdefoɔ din
yɛ wo GitHub dwumadie din. Ɛha na worekɔpi ntoboa ahorow a edi kan
akoraeɛ no mu nsɛm afiri GitHub so akɔ wo kɔmputa so.
Kɔ adwuma no ho kyerɛwtohɔ a wɔayɛ no foforo no so (sɛ woankɔ hɔ dedaw a):
cd first-contributions
Afei fa git checkout
ahyɛdeɛ no yɛ baa dwumadibea:
git checkout -b <fa-wo-din ka ho>
Nhwɛsoɔ:
git checkout -b add-quarjo-wusu
(Ɛnsɛ sɛ baa dwumadibea din no kura asɛmfua add, nanso ntease wom sɛ wode bɛka ho efisɛ baa dwumadibea yi atirimpɔw ne sɛ wode wo din bɛka list bi ho.)
Afei, bue Contributors.md
fael no wɔ text editor mu, fa wo din ka ho, na sie fael no. Sɛ wobue ahyɛdeɛ no na wo tu git status
ahyɛdeɛ no a, wobɛhunu sɛ nsakraeɛ bi wɔ hɔ. Fa nsakrae yi ka baa dwumadibea a woayɛ nkyɛe no ho denam git add
ahyɛde no so:
git add Contributors.md
Afei fa git commit
ahyɛdeɛ no yɛ nsakraeɛ yi:
git commit -m "Add <wo-din> kɔ Contributors list no so"
fa wo din si <wo-din>
ananmu.
Fa git push
ahyɛdeɛ no pia wo nsakraeɛ no:
git push origin <fa-wo-din ka ho>
fa baa dwumadibea a woadi kan abɔ no din si <fa-wo-din ka ho>
ananmu.
Sɛ wokɔ wo akoraeɛ wɔ GitHub so a, wobɛhunu `Fa toto ho.
Afei fa twetwe adesrɛ no kɔma.
Mebɛka mo nsakraeɛ nyinaa abom ayɛ adwuma yi baa dwumadibea titiriw no nnansa yi ara. Wo nsa bɛka amanneɛbɔ email bere a wɔawie nkabom no.
Wɔrensakra wo fork no nkorabata titiriw no wɔ saa bere yi mu. Sɛnea ɛbɛyɛ a wo fork no ne me de no bɛkɔ so ayɛ pɛ a, di anammɔn yi akyi.
Nea edi kan no, dan kɔ baa dwumadibea titiriw no so:
git checkout main
Na fa me akoraeɛ URL no ka ho sɛ upstream akyirikyiri url
:
git remote add upstream https://github.com/Roshanjossey/first-contributions
Wei yɛ ɔkwan a yɛbɛfa so aka akyerɛ Git sɛ saa akoraeɛ yi nkyerɛaseɛ foforɔ wɔ hɔ wɔ address a wɔakyerɛ no so, na yɛfrɛ no upstream
. Sɛ wɔka nsakraeɛ no bom wie a, hwehwɛ me akoraeɛ no foforɔ no:
git fetch upstream
Ɛha na yɛrefa nsakraeɛ a ɛwɔ me baa dwumadibea a ɛwɔ soro no nyinaa aba.Afei ɛsɛ sɛ wode me akorae no mu nsakrae foforo no bom ne wo baa dwumadibea titiriw no:
git rebase upstream/main
Ɛha na yɛde nsakraeɛ a wode baa wo baa dwumadibea kɛseɛ no nyinaa redi dwuma.Sɛ wopia baa dwumadibea kɛse no mprempren a, wo kyɛnsee no nso benya nsakrae ahorow no:
git push origin main
Kɔkɔbɔ: Saa bere yi de, worepia akɔ akyirikyiri adekorabea a wɔfrɛ no origin no so.
Saa bere yi, mede wo <fa-wo-din ka ho>
baa dwumadibea no kaa me baa dwumadibea kɛse no ho, na wo nso wode me baa dwumadibea kɛse no kaa wo baa dwumadibea titiriw no ho. Wo <fa-wo-din ka ho>
baa dwumadibea no ho nhia bio, enti wubetumi apopa:
git branch -d <add-your-name>
na wubetumi nso apopa ne akyirikyiri nkyerɛase no:
git push origin --delete <add-your-name>
Eyi ho nhia, nanso baa dwumadibea no din kyerɛ sɛ n’atirimpɔw yɛ pɔtee koraa. Ne nkwa nna betumi ayɛ tiaa.
| | | </
a> | | | | | --- | --- | --- | --- | --- | --- | | GitHub Desktop | Visual Studio 2017 | GitKraken | Visual Studio Code | Atlassian Sourcetree | IntelliJ IDEA |
You can also join our team on Slack in case you need help or have any questions. Join the team on Slack