{"title":"Ag obair le Git agus GitHub","version":"6.0","locale":"ga","docname":"internals/contributing/writing-code/working-with-git","url":"/ga/6.0/internals/contributing/writing-code/working-with-git/","canonical":"https://djangodocs.dev/ga/6.0/internals/contributing/writing-code/working-with-git/","summary":"This section explains how the community can contribute code to Django via pull requests. If you're interested in how mergers handle them, see Iarrataí tarraingthe a…","html":"<h1>Ag obair le Git agus GitHub<a class=\"heading-anchor\" href=\"#working-with-git-and-github\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h1>\n<p>This section explains how the community can contribute code to Django via pull\nrequests. If you're interested in how <a class=\"reference internal\" href=\"/ga/6.0/internals/organization/#mergers-team\"><span class=\"std std-ref\">mergers</span></a> handle\nthem, see <a class=\"reference internal\" href=\"/ga/6.0/internals/contributing/committing-code/#handling-pull-requests\"><span class=\"std std-ref\">Iarrataí tarraingthe a</span></a>.</p>\n<p>Anseo thíos, táimid chun a thaispeáint conas iarratas tarraingthe GitHub a chruthú ina bhfuil na hathruithe ar thicéad Trac #xxxxx. Trí iarratas tarraingthe go hiomlán réidh a chruthú, déanfaidh tú post an athbhreithnitheora níos éasca, rud a chiallaíonn gur dóichí go ndéanfar d'obair a chumasc i Django.</p>\n<p>D'fhéadfá paiste traidisiúnta a uaslódáil chuig Trac freisin, ach níl sé chomh praiticiúil le haghaidh athbhreithnithe.</p>\n<section id=\"installing-git\">\n<h2>Git á shuiteáil<a class=\"heading-anchor\" href=\"#installing-git\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Úsáideann Django <a href=\"#id1\"><span class=\"problematic\" id=\"id2\">`</span></a>Git <a href=\"#id3\"><span class=\"problematic\" id=\"id4\">`</span></a>_ chun a rialú foinse. Is féidir leat <a href=\"#id5\"><span class=\"problematic\" id=\"id6\">`</span></a>íoslódáil <a href=\"#id7\"><span class=\"problematic\" id=\"id8\">`</span></a>_ &lt; <a class=\"reference external\" href=\"https://git-scm.com/download\">https://git-scm.com/download</a>&gt; Git, ach is minic a bhíonn sé níos éasca a shuiteáil le bainisteoir pacáiste do chórais oibriúcháin.</p>\n<p>Óstáiltear <a class=\"reference external\" href=\"https://github.com/django/django/\">Stórlann Git `_ Django ar `GitHub</a>, agus moltar duit oibriú ag baint úsáide as GitHub freisin.</p>\n<p>Tar éis Git a shuiteáil, is é an chéad rud ba chóir duit a dhéanamh ná d'ainm agus ríomhphost a chur ar bun:</p>\n<div class=\"code-block\" data-language=\"shell\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code>$<span class=\"w\"> </span>git<span class=\"w\"> </span>config<span class=\"w\"> </span>--global<span class=\"w\"> </span>user.name<span class=\"w\"> </span><span class=\"s2\">&quot;Your Real Name&quot;</span>\n$<span class=\"w\"> </span>git<span class=\"w\"> </span>config<span class=\"w\"> </span>--global<span class=\"w\"> </span>user.email<span class=\"w\"> </span><span class=\"s2\">&quot;you@email.com&quot;</span>\n</code></pre></div>\n<p>Tabhair faoi deara gur chóir gurb é user.name` d'ainm fíor, ní d'ainm GitHub. Ba chóir go mbeadh a fhios ag GitHub an ríomhphost a úsáideann tú sa réimse <a href=\"#id1\"><span class=\"problematic\" id=\"id2\">``</span></a>user.email`, mar úsáidfear é seo chun do thiomantas a cheangal le do chuntas GitHub.</p>\n</section>\n<section id=\"setting-up-local-repository\">\n<h2>Stóra áitiúil a bhunú<a class=\"heading-anchor\" href=\"#setting-up-local-repository\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>&lt; <a class=\"reference external\" href=\"https://github.com/django/django/fork\">https://github.com/django/django/fork</a>&gt;Nuair a bheidh do chuntas GitHub cruthaithe agat, leis an nick “GitHub_nick”, agus <a href=\"#id1\"><span class=\"problematic\" id=\"id2\">`</span></a>stór Django forctha <a href=\"#id3\"><span class=\"problematic\" id=\"id4\">`</span></a>__, cruthaigh cóip áitiúil de do fhorc:</p>\n<div class=\"code-block\" data-language=\"shell\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code>git<span class=\"w\"> </span>clone<span class=\"w\"> </span>https://github.com/GitHub_nick/django.git\n</code></pre></div>\n<p>Cruthóidh sé seo eolaire nua “django”, ina bhfuil clón de do stór GitHub. Caithfear an chuid eile de na horduithe git ar an leathanach seo a reáchtáil laistigh den eolaire clónaithe, mar sin aistrigh air anois:</p>\n<div class=\"code-block\" data-language=\"shell\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code><span class=\"nb\">cd</span><span class=\"w\"> </span>django\n</code></pre></div>\n<p>Tugfar “bunús” ar do stór GitHub i Git.</p>\n<p>Ba chóir duit <code class=\"docutils literal notranslate\"><span class=\"pre\">django/django</span></code> a chur ar bun mar iargúlta “suas sruth” (is é sin, inis do git gurb é an stór tagartha Django foinse do fhorc de):</p>\n<div class=\"code-block\" data-language=\"shell\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code>git<span class=\"w\"> </span>remote<span class=\"w\"> </span>add<span class=\"w\"> </span>upstream<span class=\"w\"> </span>https://github.com/django/django.git\ngit<span class=\"w\"> </span>fetch<span class=\"w\"> </span>upstream\n</code></pre></div>\n<p>Is féidir leat iargúlta eile a chur leis ar an gcaoi chéanna, mar shampla:</p>\n<div class=\"code-block\" data-language=\"shell\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code>git<span class=\"w\"> </span>remote<span class=\"w\"> </span>add<span class=\"w\"> </span>akaariai<span class=\"w\"> </span>https://github.com/akaariai/django.git\n</code></pre></div>\n</section>\n<section id=\"working-on-a-ticket\">\n<h2>Ag obair ar thicéad<a class=\"heading-anchor\" href=\"#working-on-a-ticket\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Agus tú ag obair ar thicéad, cruthaigh brainse nua don obair, agus bunaigh an obair sin ar upstream/main`:</p>\n<div class=\"code-block\" data-language=\"shell\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code>git<span class=\"w\"> </span>checkout<span class=\"w\"> </span>-b<span class=\"w\"> </span>ticket_xxxxx<span class=\"w\"> </span>upstream/main\n</code></pre></div>\n<p>Cruthaíonn an bratach -b brainse nua duit go háitiúil. Ná bíodh aon leisce ort brainsí nua a chruthú fiú do na rudaí is lú - sin a bhfuil siad ann.</p>\n<p>Dá mbeadh tú ag obair ina ionad sin le haghaidh socrú ar an mbrainse 1.4, déanfá:</p>\n<div class=\"code-block\" data-language=\"shell\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code>git<span class=\"w\"> </span>checkout<span class=\"w\"> </span>-b<span class=\"w\"> </span>ticket_xxxxx_1_4<span class=\"w\"> </span>upstream/stable/1.4.x\n</code></pre></div>\n<p>Glac leis go ndéantar an obair ar an mbrainse ticket_xxxxx. Déan roinnt athruithe agus déan iad a dhéanamh:</p>\n<div class=\"code-block\" data-language=\"shell\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code>git<span class=\"w\"> </span>commit\n</code></pre></div>\n<p>Agus an teachtaireacht gealltanais á scríobh, lean na treoirlínte <span class=\"xref std std-ref\">commit message</span> chun obair an chumaisc a éascú. Mura bhfuil tú compordach leis an mBéarla, déan iarracht ar a laghad cur síos beacht a dhéanamh ar a ndéanann an tiomantas.</p>\n<p>Más gá duit obair bhreise a dhéanamh ar do bhrainse, déan tiomantas chomh minic agus is gá:</p>\n<div class=\"code-block\" data-language=\"shell\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code>git<span class=\"w\"> </span>commit<span class=\"w\"> </span>-m<span class=\"w\"> </span><span class=\"s1\">&#39;Added two more tests for edge cases.&#39;</span>\n</code></pre></div>\n<section id=\"publishing-work\">\n<h3>Obair fhoilsithe<a class=\"heading-anchor\" href=\"#publishing-work\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Is féidir leat do chuid oibre a fhoilsiú ar GitHub trí rith:</p>\n<div class=\"code-block\" data-language=\"shell\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code>git<span class=\"w\"> </span>push<span class=\"w\"> </span>origin<span class=\"w\"> </span>ticket_xxxxx\n</code></pre></div>\n<p>Nuair a théann tú chuig do leathanach GitHub, tabharfaidh tú faoi deara go bhfuil brainse nua cruthaithe.</p>\n<p>Má tá tú ag obair ar thicéad Trac, ba chóir duit a lua sa ticéad go bhfuil d'obair ar fáil ó bhrainse ticket_xxxxx de do repo GitHub. Cuir nasc chuig do bhrainse san áireamh.</p>\n<p>Tabhair faoi deara go dtugtar &quot;brainse ábhar&quot; ar an mbrainse thuas i parlance Git. Tá cead agat stair an bhrainse seo a athscríobh, trí <code class=\"docutils literal notranslate\"><span class=\"pre\">git</span> <span class=\"pre\">rebase</span></code> a úsáid mar shampla. Níor cheart do dhaoine eile a gcuid oibre a bhunú ar bhrainse den sórt sin, mar go n-éireodh a gclón truaillithe nuair a dhéanann tú eagarthóireacht ar ghealltanais.</p>\n<p>Tá “brainsí poiblí” ann freisin. Is brainsí iad seo atá ceaptha do dhaoine eile a fhorc, mar sin níor chóir go n-athródh stair na mbrainsí seo riamh. Is iad samplaí maithe de bhrainsí poiblí na brainsí <code class=\"docutils literal notranslate\"><span class=\"pre\">main</span></code> agus stable/A.B.X` sa stór django/django`.</p>\n<p>Nuair a cheapann tú go bhfuil do chuid oibre réidh le tarraingt isteach i Django, ba cheart duit iarratas tarraingthe a chruthú ag GitHub. Ciallaíonn iarratas tarraingthe maith:</p>\n<ul class=\"simple\">\n<li><p>commits with one logical change in each, following the\n<a class=\"reference internal\" href=\"/ga/6.0/internals/contributing/writing-code/coding-style/\"><span class=\"doc\">coding style</span></a>,</p></li>\n<li><p>teachtaireachtaí dea-fhoirmithe do gach tiomantas: líne achoimre agus ansin míreanna atá fillte ag 72 carachtar ina dhiaidh sin - féach in:ref: <a href=\"#id1\"><span class=\"problematic\" id=\"id2\">`</span></a>treoirlínte tiomanta &lt;committing-guidelines&gt;`le haghaidh tuilleadh sonraí,</p></li>\n<li><p>doiciméadú agus tástálacha, más gá -- bíonn tástálacha de dhíth i gcónaí, ach amháin má dhéantar athruithe ar dhoiciméid.</p></li>\n</ul>\n<p>Caithfidh an seomra tástála pas a fháil agus ní mór na doiciméid a thógáil gan rabhadh.</p>\n<p>Nuair a bheidh d'iarratas tarraingthe cruthaithe agat, ba cheart duit trácht a chur leis sa ticéad Trac gaolmhar ag míniú cad atá déanta agat. Go háirithe, ba chóir duit an timpeallacht inar reáchtáil tú na tástálacha a thabhairt faoi deara, mar shampla: “téann gach tástáil faoi SQLite agus MySQL”.</p>\n<p>Níl ach dhá stát ag iarratais tarraingthe ag GitHub: oscailte agus dúnta. Níl ach dhá rogha ag an gcumasc a dhéileálfaidh le d'iarratas tarraingthe: é a chumasc nó é a dhúnadh. Ar an gcúis seo, níl sé úsáideach iarratas tarraingthe a dhéanamh go dtí go mbeidh an cód réidh le cumasc - nó gar go leor go gcríochnóidh cumaisc é féin.</p>\n</section>\n<section id=\"editing-commit-messages\">\n<span id=\"id1\"></span><h3>Editing commit messages<a class=\"heading-anchor\" href=\"#editing-commit-messages\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>To change the message of the most recent commit, run:</p>\n<div class=\"code-block\" data-language=\"shell\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code>git<span class=\"w\"> </span>commit<span class=\"w\"> </span>--amend\n</code></pre></div>\n<p>This opens an editor with the current commit message. Edit it, save, and close\nto update the commit.</p>\n<p>To change the message of an earlier commit, use the &quot;reword&quot; option in\ninteractive rebase. For example, to reword one of the last three commits:</p>\n<div class=\"code-block\" data-language=\"shell\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code>git<span class=\"w\"> </span>rebase<span class=\"w\"> </span>-i<span class=\"w\"> </span>HEAD~3\n</code></pre></div>\n<p>This opens an editor listing the three commits, each prefixed with the word\n&quot;pick&quot;. Change &quot;pick&quot; to &quot;reword&quot; (or &quot;r&quot;) on the line of the commit you want\nto change, then save and close. A new editor will open for each commit marked\nas &quot;reword&quot;, allowing you to update the message.</p>\n<p>See <a class=\"reference internal\" href=\"/ga/6.0/internals/contributing/committing-code/#committing-guidelines\"><span class=\"std std-ref\">Treoirlínte a</span></a> for the required commit message format.</p>\n<p>After rewriting a commit that has already been pushed to GitHub, you will need\nto force-push your branch:</p>\n<div class=\"code-block\" data-language=\"shell\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code>git<span class=\"w\"> </span>push<span class=\"w\"> </span>--force-with-lease<span class=\"w\"> </span>origin<span class=\"w\"> </span>ticket_xxxxx\n</code></pre></div>\n</section>\n<section id=\"rebasing-branches\">\n<h3>Brainsí a athbhunú<a class=\"heading-anchor\" href=\"#rebasing-branches\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>In the example above, you created two commits, the &quot;Fixed #xxxxx  -- ...&quot;\ncommit and the &quot;Added two more tests ...&quot; commit.</p>\n<p>Níl muid ag iarraidh stair iomlán do phróisis oibre a bheith agat i do stór. Bheadh torann neamhchabhrach do thiomantas “Cuireadh dhá thástáil eile leis”. Ina áit sin, b'fhearr linn ach tiomantas amháin a mbeadh do chuid oibre go léir ann.</p>\n<p>Chun stair do bhrainse a athoibriú is féidir leat na gealltanais a scuabadh i gceann amháin trí athbhunú idirghníomhach a úsáid:</p>\n<div class=\"code-block\" data-language=\"shell\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code>git<span class=\"w\"> </span>rebase<span class=\"w\"> </span>-i<span class=\"w\"> </span>HEAD~2\n</code></pre></div>\n<p>Is gearrthóg é an HEAD ~ 2 thuas do dhá thiomantas is déanaí. Osclóidh an t-ordú thuas eagarthóir a thaispeánann an dá thiomantas, réamhshocraithe leis an bhfocal “pioc”.</p>\n<p>Athraigh “pioc” ar an dara líne go “squash” ina ionad sin. Coinneoidh sé seo an chéad tiomantas, agus cuirfidh sé an dara tiomantas isteach sa chéad cheann. Sábháil agus scor an t-eagarthóir. Ba chóir go n-osclaíonn an dara fuinneog eagarthóra, ionas gur féidir leat an teachtaireacht tiomanta don tiomantas a athfhocal anois go bhfuil an dá chéim ann.</p>\n<p>Is féidir leat an rogha “eagarthóireacht” a úsáid i rebase freisin. Ar an mbealach seo is féidir leat tiomantas amháin a athrú, mar shampla chun clóscríobh a shocrú i docstring:</p>\n<div class=\"code-block\" data-language=\"shell\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code>git<span class=\"w\"> </span>rebase<span class=\"w\"> </span>-i<span class=\"w\"> </span>HEAD~3\n<span class=\"c1\"># Choose edit, pick, pick for the commits</span>\n<span class=\"c1\"># Now you are able to rework the commit (use git add normally to add changes)</span>\n<span class=\"c1\"># When finished, commit work with &quot;--amend&quot; and continue</span>\ngit<span class=\"w\"> </span>commit<span class=\"w\"> </span>--amend\n<span class=\"c1\"># Reword the commit message if needed</span>\ngit<span class=\"w\"> </span>rebase<span class=\"w\"> </span>--continue\n<span class=\"c1\"># The second and third commits should be applied.</span>\n</code></pre></div>\n<p>Má tá do bhrainse ábhar foilsithe cheana féin ag GitHub, mar shampla má tá mionathruithe á dhéanamh agat chun athbhreithniú a chur san áireamh, beidh ort na hathruithe a bhrú go foréigeach:</p>\n<div class=\"code-block\" data-language=\"shell\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code>git<span class=\"w\"> </span>push<span class=\"w\"> </span>--force-with-lease<span class=\"w\"> </span>origin<span class=\"w\"> </span>ticket_xxxxx\n</code></pre></div>\n<p>Tabhair faoi deara go n-athscríobfaidh sé seo stair ticket_xxxxx - má sheiceálann tú na hashes tiomanta roimh agus tar éis na hoibríochta ag GitHub tabharfaidh tú faoi deara nach n-oireann na hashes tiomanta níos mó. Tá sé seo inghlactha, toisc gur brainse ábhar í an bhrainse, agus níor cheart d'aon duine a bheith ag bhunú a gcuid oibre air.</p>\n</section>\n<section id=\"after-upstream-has-changed\">\n<h3>Tar éis athrú suas sruth<a class=\"heading-anchor\" href=\"#after-upstream-has-changed\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Nuair a athraíonn suas sruth (<code class=\"docutils literal notranslate\"><span class=\"pre\">django/django</span></code>), ba cheart duit do chuid oibre a athbhunú. Chun seo a dhéanamh, bain úsáid as:</p>\n<div class=\"code-block\" data-language=\"shell\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code>git<span class=\"w\"> </span>fetch<span class=\"w\"> </span>upstream\ngit<span class=\"w\"> </span>rebase<span class=\"w\"> </span>upstream/main\n</code></pre></div>\n<p>Déantar an obair a athbhunú go huathoibríoch ag baint úsáide as an mbrainse a rinne tú air, sa chás samplach ag baint úsáide as upstream/main`.</p>\n<p>Baineann an t-ordú rebase do ghealltanais áitiúla go léir go sealadach, cuireann an gealltanas in aghaidh an tsrutha i bhfeidhm, agus ansin cuireann do ghealltanas áitiúil i bhfeidhm arís ar an obair.</p>\n<p>Má tá coinbhleachtaí cumaisc ann, beidh ort iad a réiteach agus ansin <code class=\"docutils literal notranslate\"><span class=\"pre\">git</span> <span class=\"pre\">rebase</span> <span class=\"pre\">--continue</span></code> a úsáid. Ag pointe ar bith is féidir leat <code class=\"docutils literal notranslate\"><span class=\"pre\">git</span> <span class=\"pre\">rebase</span> <span class=\"pre\">--abort</span></code> a úsáid chun filleadh ar an stát bunaidh.</p>\n<p>Tabhair faoi deara go dteastaíonn uait* a athbhunú* ar an sruth, ne*cumasch* an suas sruth.</p>\n<p>Is é an chúis atá leis seo ná go mbeidh do thiomantas i gcónaí* ar bharr* obair an tsraith, ne*measctha la* na hathruithe ar an sruth suas. Ar an mbealach seo ní bheidh ach gealltanais a bhaineann lena ábhar i do bhrainse, rud a fhágann go bhfuil sé níos éasca squashing.</p>\n</section>\n<section id=\"after-review\">\n<h3>Tar éis léirmheas<a class=\"heading-anchor\" href=\"#after-review\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Tá sé neamhghnách aon mhéid cód neamh-thráthúil a fháil isteach i gcroílár gan athruithe a iarrann athbhreithnithe. Sa chás seo, is minic gur smaoineamh maith é na hathruithe a chur leis mar thiomantas incriminteach amháin do do chuid oibre. Ligeann sé seo don athbhreithneoir na hathruithe atá déanta agat a sheiceáil go héasca.</p>\n<p>Sa chás seo, déan na hathruithe a theastaíonn ón athbhreithneoir. Tiomantas chomh minic agus is gá. Sula bhfoilsíonn na hathruithe, déan do chuid oibre a athbhun Má chuir tú dhá thiomantas leis, rith tú:</p>\n<div class=\"code-block\" data-language=\"shell\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code>git<span class=\"w\"> </span>rebase<span class=\"w\"> </span>-i<span class=\"w\"> </span>HEAD~2\n</code></pre></div>\n<p>Squash an dara tiomantas isteach sa chéad cheann. Scríobh teachtaireacht tiomanta ar na línte de:</p>\n<div class=\"code-block\" data-language=\"text\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Text</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Text code\"><code>Made changes asked in review by &lt;reviewer&gt;.\n\n- Fixed whitespace errors in foobar.\n- Reworded the docstring of bar().\n</code></pre></div>\n<p>Faoi dheireadh, brúigh do chuid oibre ar ais chuig do stór GitHub. Ós rud é nár chuir tú teagmháil leis na gealltanais phoiblí le linn an athbhunaithe, níor cheart go mbeadh ort brú go foréigeantach:</p>\n<div class=\"code-block\" data-language=\"shell\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code>git<span class=\"w\"> </span>push<span class=\"w\"> </span>origin<span class=\"w\"> </span>ticket_xxxxx\n</code></pre></div>\n<p>Ba chóir go mbeadh an tiomantas nua i d'iarratas tarraingthe anois freisin.</p>\n<p>Tabhair faoi deara gur dócha go gcuirfidh an cumasc an gealltanas athbhreithnithe isteach sa ghealltanas roimhe seo agus an cód á ghealladh.</p>\n</section>\n</section>\n<section id=\"working-on-a-patch\">\n<h2>Ag obair ar phaiste<a class=\"heading-anchor\" href=\"#working-on-a-patch\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Ceann de na bealaí is féidir le forbróirí cur le Django ná trí phaistí a athbhreithniú. De ghnáth beidh na paistí sin ann mar iarratais tarraingthe ar GitHub agus is féidir iad a chomhtháthú go héasca i do stór áitiúil:</p>\n<div class=\"code-block\" data-language=\"shell\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code>git<span class=\"w\"> </span>checkout<span class=\"w\"> </span>-b<span class=\"w\"> </span>pull_xxxxx<span class=\"w\"> </span>upstream/main\ncurl<span class=\"w\"> </span>-L<span class=\"w\"> </span>https://github.com/django/django/pull/xxxxx.patch<span class=\"w\"> </span><span class=\"p\">|</span><span class=\"w\"> </span>git<span class=\"w\"> </span>am\n</code></pre></div>\n<p>Cruthóidh sé seo brainse nua agus ansin cuirfidh sé na hathruithe ón iarratas tarraingthe i bhfeidhm air. Ag an bpointe seo is féidir leat na tástálacha a reáchtáil nó aon rud eile a dhéanamh a chaithfidh tú a dhéanamh chun cáilíocht an phaiste a imscrúdú.</p>\n<p>&lt;handling-pull-requests&gt;Le haghaidh tuilleadh sonraí maidir le hoibriú le hiarratais tarraingthe féach in:ref: <a href=\"#id1\"><span class=\"problematic\" id=\"id2\">`</span></a>treoirlínte maidir le cumaisc <a href=\"#id3\"><span class=\"problematic\" id=\"id4\">`</span></a>.</p>\n</section>\n<section id=\"summary\">\n<h2>Achoimre<a class=\"heading-anchor\" href=\"#summary\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<ul class=\"simple\">\n<li><p>Oibrigh ar GitHub más féidir leat.</p></li>\n<li><p>Fógraigh d'obair ar thicéad Trac trí nasc a dhéanamh le do bhrainse GitHub.</p></li>\n<li><p>Nuair a bhíonn rud éigin réidh agat, déan iarratas tarraingthe.</p></li>\n<li><p>Déan d'iarratais tarraingthe chomh maith agus is féidir leat.</p></li>\n<li><p>Agus tú ag déanamh ceartúcháin ar do chuid oibre, bain úsáid as <code class=\"docutils literal notranslate\"><span class=\"pre\">git</span> <span class=\"pre\">rebase</span> <span class=\"pre\">-i</span></code> chun na gealltanais a scuabadh.</p></li>\n<li><p>Nuair a bheidh athraithe suas sruth, déan <code class=\"docutils literal notranslate\"><span class=\"pre\">git</span> <span class=\"pre\">fetch</span> <span class=\"pre\">upstream;</span> <span class=\"pre\">git</span> <span class=\"pre\">rebase</span></code>.</p></li>\n</ul>\n</section>","rootId":"working-with-git-and-github","toc":[{"title":"Git á shuiteáil","anchor":"installing-git","children":[]},{"title":"Stóra áitiúil a bhunú","anchor":"setting-up-local-repository","children":[]},{"title":"Ag obair ar thicéad","anchor":"working-on-a-ticket","children":[{"title":"Obair fhoilsithe","anchor":"publishing-work","children":[]},{"title":"Editing commit messages","anchor":"editing-commit-messages","children":[]},{"title":"Brainsí a athbhunú","anchor":"rebasing-branches","children":[]},{"title":"Tar éis athrú suas sruth","anchor":"after-upstream-has-changed","children":[]},{"title":"Tar éis léirmheas","anchor":"after-review","children":[]}]},{"title":"Ag obair ar phaiste","anchor":"working-on-a-patch","children":[]},{"title":"Achoimre","anchor":"summary","children":[]}],"breadcrumbs":[{"docname":"internals/index","title":"Inmheánacha Django","url":"/ga/6.0/internals/"},{"docname":"internals/contributing/index","title":"Ag cur le Django","url":"/ga/6.0/internals/contributing/"},{"docname":"internals/contributing/writing-code/index","title":"Cód rannpháirteach","url":"/ga/6.0/internals/contributing/writing-code/"}],"prev":{"docname":"internals/contributing/writing-code/unit-tests","title":"Tástálacha aonaid","url":"/ga/6.0/internals/contributing/writing-code/unit-tests/"},"next":{"docname":"internals/contributing/writing-code/coding-style","title":"Stíl chódú","url":"/ga/6.0/internals/contributing/writing-code/coding-style/"},"formats":{"html":"/ga/6.0/internals/contributing/writing-code/working-with-git/","markdown":"/ga/6.0/internals/contributing/writing-code/working-with-git.md","json":"/ga/6.0/internals/contributing/writing-code/working-with-git.json"},"source":"https://github.com/django/django/blob/stable/6.0.x/docs/internals/contributing/writing-code/working-with-git.txt","official":"https://docs.djangoproject.com/ga/6.0/internals/contributing/writing-code/working-with-git/","inVersions":["6.1","6.0","5.2"],"inLocales":["en","sv","zh-hans","ga","fr","ja","id","it","pt-br","ko","es","el","pl"]}