I want to access my local Git repository so I can change the name of a branch; I understand that I can do this by changing the name on the local repo which will then automatically migrate to the Git repo on Xcode 9. (If I'm wrong, please tell me how to do it, or point to a doc that tells me how to do it).
Thank you...
Hi Rolf,
I hope that my below answer helps as you reference how to access your local repository to change a branch name but also suggested changing the repository name as a whole.
For changing the branch name:
# Clone the repository to your local machine or if you already have it, git pull to update
# Access the repository location on your machine and run the appropriate commands to rename:
git branch -m <branch> # Renames the current branch locally //
git branch -m old_branch new_branch # Rename branch locally //
git push origin :old_branch # Delete the old branch //
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote //
See Atlassian Tutorial - Git Branch
Cheers,
Mark
Hi @Mark...
How do I determine the address of the Bitbucket repository (i.e. where is it: local or remote)? It's been quite a while since I have played with Bitbucket, like several years of neglecting my app and now I need to bring repos up to date with code.
Regards, Rolf
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Rolf Marsh
If you navigate to the repository in Bitbucket Server, in the left navigation pane, there is an option to Clone. When you select this, the clone URL will be provided. See Clone a Repository
In the event you meant how to find the repository address in git you can run the following command when you navigate to your repository on your local machine via command line:
git remote -v
This will print your remote fetch and push URL. If you need to update these URL's you can run the following command:
git remote set-url origin https://example.com/URL/REPOSITORY.git
Cheers,
Mark
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.