<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Guilherme Dakuzaku on Medium]]></title>
        <description><![CDATA[Stories by Guilherme Dakuzaku on Medium]]></description>
        <link>https://medium.com/@makoto-rocketti?source=rss-1a9fc4049359------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*ugRbTiDZZUn1hNsO7qvtBA.jpeg</url>
            <title>Stories by Guilherme Dakuzaku on Medium</title>
            <link>https://medium.com/@makoto-rocketti?source=rss-1a9fc4049359------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 23:47:24 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@makoto-rocketti/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[[Só Faz] Git Error: error: cannot lock ref 'branch_a': 'branch_b'; cannot create 'branch_a']]></title>
            <link>https://makoto-rocketti.medium.com/s%C3%B3-faz-git-error-error-cannot-lock-ref-branch-a-branch-b-cannot-create-branch-a-60ca3235e4d8?source=rss-1a9fc4049359------2</link>
            <guid isPermaLink="false">https://medium.com/p/60ca3235e4d8</guid>
            <category><![CDATA[git]]></category>
            <category><![CDATA[shell]]></category>
            <dc:creator><![CDATA[Guilherme Dakuzaku]]></dc:creator>
            <pubDate>Tue, 27 Jul 2021 04:46:14 GMT</pubDate>
            <atom:updated>2021-07-27T04:46:14.680Z</atom:updated>
            <content:encoded><![CDATA[<h4>&quot;Só faz&quot; são artigos que propõe as soluções mais rápidas, se você quer entender melhor, veja a seção &quot;mais no bit&quot;</h4><p>Seu erro é parecido com esse?</p><pre>error: cannot lock ref &#39;refs/remotes/origin/will_delete/feature&#39;: &#39;refs/remotes/origin/will_delete&#39; exists; cannot create &#39;refs/remotes/origin/will_delete/feature&#39;<br>From github.com:Rocketti/techcollege<br> ! [new branch]      will_delete/feature -&gt; origin/will_delete/feature  (unable to update local ref)<br>error: some local refs could not be updated; try running<br> &#39;git remote prune origin&#39; to remove any old, conflicting branches</pre><p>Então execute:</p><pre>git fetch -p<br>ou<br>git remote prune origin</pre><h4><strong>Mais no bit:</strong></h4><p>A primeiro momento: crio a branch vindo da main, normal e dou um push para que vai para a origin.</p><pre>git checkout -b will_delete<br>git push --set-upstream origin will_delete</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/573/1*giD907xd142EPI_ShiHtwA.png" /></figure><p>Lá no site da github, vou ver que a branch está lá, vou deleta-la e depois criar uma outra chamada will_delete/feature.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/783/1*gNFk48fqxBhXXdl-tlZA-w.png" /><figcaption>Conferido que will_delete está como branch</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PBHwmgov3ru5pe_mtAzVzA.png" /><figcaption>Criada will_detele/ferature a partir da main</figcaption></figure><p>Qual seria o caminho normal? Ir para o terminal e dar o pull, porém olhe o erro:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ytds_xVhRkdSYd8U9UhwyA.png" /><figcaption>Erro com git pull</figcaption></figure><p><strong>Qual motivo? </strong><br>Quando criei a branh <strong>will_delete/feature</strong> na web, não deletei localmente a <strong>will_delete </strong>que eu tinha criado lá no começo do processo e quando o git vai criar o fluxo para <strong>will_delete/feature</strong> ele da conflito porque <strong>will_delete</strong> ainda criado localmente.</p><p><strong>Como resolver?</strong><br>Use um dos dois comandos abaixo. Em ambos vão ativar o prune, aonde ele vai deletar localmente os repositórios que foram deletados da origin.</p><pre>git fetch -p<br>ou<br>git remote prune origin</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/553/1*iVV4nmdZI2FZ93hJOP3M0w.png" /><figcaption>Resultado</figcaption></figure><p>Tá resolvido, rápido e simples.</p><p>Até a próxima galera!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=60ca3235e4d8" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>