Rename a repo in GitKraken?
Asked Answered
K

3

18

I have been unable to find how to rename a local repo in GitKraken, or if this feature is unavailable.

I believe the option was available if you use the Init feature to generate the local and remote repos, but I'm wanting to update the repo name after it's already been set up and used.

(I set up my remote repo on BitBucket, then cloned my local repo in GitKraken, and it just uses the last folder name in the local path as the repo name.)

GitKraken UI, with repo tab circled for emphasis

Kennedy answered 6/3, 2019 at 14:37 Comment(3)
I think this might not be possible.. If you look at the localRepoCache (https://mcmap.net/q/741884/-gitkraken-config-file-windows/…), GitKraken only saves the directories of the repos, it doesn't seem to have a separate name for them.Ludwick
@Gama11, what's the purpose of Name field in "Initialize a repo" by the way?Filiate
@Filiate It's the name of the repo and it creates a folder with the same name to store everything in it.Cinerarium
D
10

This is the top result when searching for solutions to this issue.

In case anyone stumbles across this post, these days GitKraken has the ability (at least it does on macOS) to add aliases to existing repos which resolves this issue for me.

To add an alias, you first need to open the repo, then right-click the tab (in the tab bar at the top), and choose the "Alias repository" option. This will then allow you to define an alternative name for that particular repo.

A screenshot showing the open, tab context menu.

Happy aliasing! :)

Duplet answered 16/6, 2022 at 1:14 Comment(2)
Thank you!! Ugh! This was so frustrating! BTW, do you know where they store that alias? Is it in the repo itself?Bewilderment
You're welcome @MarkA.Donohoe! On MacOS the aliases are stored in a config file located in /Users/username/.gitkraken/config.Duplet
V
4

My recommendation would be to push everything you have to repo, then rename on the repository itself online, then re-clone from the new location as if it was a new repo.

Verst answered 7/2, 2020 at 3:10 Comment(1)
I'm not going to vote this down because a) this post is literally four years old, and b) I hate having that happen to my own posts, but this is very bad advice!! Physically changing a repo name can affect everyone who pulls/pushes to it. Plus, the name as it appears in a client has nothing to do with the repo itself. It's purely UI. Fortunately, as others have shown (and maybe this happened since your answer posted), GitKraken now supports aliasing repositories via right-clicking on the tab, just as the OP hoped. https://mcmap.net/q/682217/-rename-a-repo-in-gitkrakenBewilderment
D
0

Having encountered this issue myself, if you're pushing a repo to an origin for the first time, you can actually rename it in Git Kraken, as shown in the screenshot below.

I hope this helps!

Git Kraken "Create remot and push local refs" page.

Dyslalia answered 15/2, 2024 at 1:53 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.