# How do I use the "Copy branch name" button?

**URL:** <https://forum.gitea.com/t/how-do-i-use-the-copy-branch-name-button/7201>\
**Category:** Gitea Usages\
**Created:** [May 2, 2023, 4:45pm UTC](https://forum.gitea.com/t/how-do-i-use-the-copy-branch-name-button/7201 "2023-05-02T16:45:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![MrRar](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/mrrar/32/3665_2.png) [@MrRar](https://forum.gitea.com/u/MrRar)\
**Post date:** [May 2, 2023, 4:45pm UTC](https://forum.gitea.com/t/how-do-i-use-the-copy-branch-name-button/7201/1 "2023-05-02T16:45:55Z")

</div>

Here is a randomly selected PR: [#292 - Some new plants including badland plants. - Exile - Codeberg.org](https://codeberg.org/Mantar/Exile/pulls/292)

When I press the “Copy branch name” button I get:  
lord\_of\_the\_dumpster/Exile:badland-plants

How do I use that?

It seems like it would be much better if I got:  
git fetch hxxps://codeberg.org/lord\_of\_the\_dumpster/Exile.git badland-plants  
(I had to replace the t’s with x’s because the forum software was messing it up.)

That would be useful to fetch and test a PR.

---

<div class="post-metadata">

**Author:** ![wxiaoguang](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/wxiaoguang/32/2280_2.png) [@wxiaoguang](https://forum.gitea.com/u/wxiaoguang)\
**Post date:** [May 2, 2023, 5:02pm UTC](https://forum.gitea.com/t/how-do-i-use-the-copy-branch-name-button/7201/2 "2023-05-02T17:02:13Z")

</div>

This might help.

You could also suggest other useful commands (if enough people like)

 ![image](https://us1.discourse-cdn.com/flex020/uploads/gitea/original/2X/b/b576e5e3c51fcde5c5ac543367c1a19d29653933.png)

---

<div class="post-metadata">

**Author:** ![MrRar](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/mrrar/32/3665_2.png) [@MrRar](https://forum.gitea.com/u/MrRar)\
**Post date:** [May 2, 2023, 7:40pm UTC](https://forum.gitea.com/t/how-do-i-use-the-copy-branch-name-button/7201/3 "2023-05-02T19:40:15Z")

</div>

Thank you. That is good to know.

That info does not appear on the PRs of some repos for some reason. Different repo settings I guess. I will have to do some research. Here is an example of a PR on Codeberg with no git command help: [https://codeberg.org/mineclonia/mineclonia/pulls/158](https://codeberg.org/mineclonia/mineclonia/pulls/158)

But that doesn’t answer my question about the use of the “Copy branch name” button.

---

<div class="post-metadata">

**Author:** ![wxiaoguang](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/wxiaoguang/32/2280_2.png) [@wxiaoguang](https://forum.gitea.com/u/wxiaoguang)\
**Post date:** [May 3, 2023, 3:21am UTC](https://forum.gitea.com/t/how-do-i-use-the-copy-branch-name-button/7201/4 "2023-05-03T03:21:31Z")

</div>

The “copy branch name” : it’s related to [Source branch reference should probably be `user/repo` · Issue #20408 · go-gitea/gitea · GitHub](https://github.com/go-gitea/gitea/issues/20408) , no conclusion yet.

There are different use cases for it.

* * *

Copy the `user/repo:banch` pattern to construct compare URLs manually.

---

<div class="post-metadata">

**Author:** ![MrRar](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/mrrar/32/3665_2.png) [@MrRar](https://forum.gitea.com/u/MrRar)\
**Post date:** [May 3, 2023, 3:16pm UTC](https://forum.gitea.com/t/how-do-i-use-the-copy-branch-name-button/7201/5 "2023-05-03T15:16:46Z")

</div>

You’re saying it’s used for git diff? That would explain it.

Thanks for making that PR that makes the command line instructions show up even if there are merge conflicts.

I just wish that info showed up at the top not the bottom.
