This website showed an interesting command, in the output git gives a hint how to remove a stale.
My first attempt failed, second attempt was successfull: E:\SourceCode\PascalCoinGit\PascalCoin>git remote prune origin/master fatal: 'origin/master' does not appear to be a git repository fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. E:\SourceCode\PascalCoinGit\PascalCoin>git remote prune origin Pruning origin URL: https://github.com/SkybuckFlying/PascalCoin * [pruned] origin/master E:\SourceCode\PascalCoinGit\PascalCoin> Website: https://stackoverflow.com/questions/9224754/how-to-remove-origin-from-git-repository Command: git remote show origin (Seen it before but completely forgot about it) Result: E:\SourceCode\PascalCoinGit\PascalCoin>git remote show origin * remote origin Fetch URL: https://github.com/SkybuckFlying/PascalCoin Push URL: https://github.com/SkybuckFlying/PascalCoin HEAD branch: PascalCoinMaster Remote branches: GUIExperimentalBugFixes1 tracked GUIExperimentalBugFixes2 tracked GUIExperimentalBugFixes3 tracked GUIExperimentalBugFixes4 tracked GUIExperimentalBugFixes5 tracked MergeTest tracked PIP-0026Windows7Implementation tracked PascalCoinMaster tracked SkybuckMaster tracked TestPascalCoinMaster tracked refs/remotes/origin/master stale (use 'git remote prune' to remove) Local branches configured for 'git pull': GUIExperimentalBugFixes1 merges with remote GUIExperimentalBugFixes1 GUIExperimentalBugFixes2 merges with remote GUIExperimentalBugFixes2 GUIExperimentalBugFixes4 merges with remote GUIExperimentalBugFixes4 GUIExperimentalBugFixes5 merges with remote GUIExperimentalBugFixes5 MergeTest merges with remote MergeTest PIP-0026Windows7Implementation merges with remote PIP-0026Windows7Implementation SkybuckMaster merges with remote SkybuckMaster Local refs configured for 'git push': GUIExperimentalBugFixes1 pushes to GUIExperimentalBugFixes1 (up to date) GUIExperimentalBugFixes2 pushes to GUIExperimentalBugFixes2 (up to date) GUIExperimentalBugFixes3 pushes to GUIExperimentalBugFixes3 (up to date) GUIExperimentalBugFixes4 pushes to GUIExperimentalBugFixes4 (up to date) GUIExperimentalBugFixes5 pushes to GUIExperimentalBugFixes5 (up to date) MergeTest pushes to MergeTest (up to date) PIP-0026Windows7Implementation pushes to PIP-0026Windows7Implementation (fast-forwardable) PascalCoinMaster pushes to PascalCoinMaster (up to date) SkybuckMaster pushes to SkybuckMaster (up to date) TestPascalCoinMaster pushes to TestPascalCoinMaster (up to date) E:\SourceCode\PascalCoinGit\PascalCoin> git branch -r Yup now it shows it's gone ! Case solved ! =D Bye, Skybuck. On Sunday, November 21, 2021 at 2:06:37 AM UTC+1 skybuck2000 wrote: > Another one in here: > > E:\SourceCode\PascalCoinGit\PascalCoin\.git\logs\refs\remotes\origin > > I will try rename both to see what happens > > Now didn't help much, I renamed both to originalmaster and then branch -r > showed: > origin/master > origin/originalmaster > > So renamed them back to master... hmmm... > > Bye, > Skybuck. > On Sunday, November 21, 2021 at 2:02:32 AM UTC+1 skybuck2000 wrote: > >> I tried moving this master file elsewhere it had some effect on the graph >> but even after moving >> git branch -r >> still shows it... >> so there is more to it... >> >> The hash pointed to some merge of remote/master into master >> >> and then there are some more commits like that. >> >> I will check other git files to see if I can find anything else. >> >> Bye, >> Skybuck. >> >> On Sunday, November 21, 2021 at 1:57:37 AM UTC+1 skybuck2000 wrote: >> >>> Also I see this file >>> >>> master >>> >>> in >>> >>> E:\SourceCode\PascalCoinGit\PascalCoin\.git\refs\remotes\origin >>> >>> Perhaps delete this file to get rid of it ? Is this safe ? :) >>> >>> There seems to be some hash inside of it. >>> >>> Bye, >>> Skybuck. >>> >>> On Sunday, November 21, 2021 at 1:55:41 AM UTC+1 skybuck2000 wrote: >>> >>>> Checking the hidden files of git, I find this, maybe this has something >>>> to do with it: >>>> >>>> packed-ref file: >>>> >>>> # pack-refs with: peeled fully-peeled sorted >>>> 5dc3f5fb2342d306a029d7d4058fe28fd2daeee2 refs/remotes/origin/MergeTest >>>> 5a3a8b283ae8aa37272485fd9711b6d1e5ec33a8 refs/remotes/origin/master >>>> 0000c33018784335daf4b47f622b88a76971855c refs/tags/1.5.6 >>>> 262352cfb06842492d7e666cbd503f9b3b27578b refs/tags/2.0 >>>> 68ac8ba519bf59541fc9009a0682abb8220cbba4 refs/tags/2.1.2 >>>> 7980dfc903f716f493c28ba8d5ff323d6900fee4 refs/tags/2.1.3 >>>> >>>> On Sunday, November 21, 2021 at 1:47:33 AM UTC+1 skybuck2000 wrote: >>>> >>>>> Just to be clear the local master branch was also renamed to >>>>> SkybuckMaster. >>>>> >>>>> But origin/master still shows up ? >>>>> >>>>> Kinda strange ? >>>>> >>>>> Any explanation why this is and if it can be completely removed ? >>>>> >>>>> (Maybe destroying old commits might allow to do that, but if it's >>>>> possible to do without destroying old commits that would be better >>>>> ofcourse >>>>> ;)) >>>>> >>>>> I also tried >>>>> git fetch --prune >>>>> >>>>> But that did not help. >>>>> >>>>> git branch -r >>>>> >>>>> still shows origin/master >>>>> >>>>> to be present ? >>>>> >>>>> pushing or delete origin/master like so will give an error message >>>>> kinda proving it's already gone ? >>>>> >>>>> git push origin --delete master >>>>> error: unable to delete 'master': remote ref does not exist >>>>> >>>>> git push origin --delete origin/master >>>>> error: unable to delete 'origin/master': remote ref does not exist >>>>> >>>>> git fetch origin >>>>> >>>>> git branch -r >>>>> >>>>> origin/master >>>>> >>>>> still shows up in bottom ?! >>>>> >>>>> Weird or what ?! =D >>>>> >>>>> Bye, >>>>> Skybuck. >>>>> On Sunday, November 21, 2021 at 1:42:32 AM UTC+1 skybuck2000 wrote: >>>>> >>>>>> Hello, >>>>>> >>>>>> After renaming the github default branch "origin/master" to >>>>>> "origin/SkybuckMaster" I notice that on the local repository there is >>>>>> still >>>>>> some left over origin/master. >>>>>> >>>>>> When typing for example: >>>>>> git branch -a >>>>>> or >>>>>> git branch -r >>>>>> >>>>>> It will still show origin/master >>>>>> >>>>>> Is this because in the past merges/commits and such where done onto >>>>>> this remote branch ? >>>>>> >>>>>> Or is it possible to somehow remove origin/master from local >>>>>> repository. >>>>>> >>>>>> I may want to re-use origin/master in the future ? >>>>>> >>>>>> Bye, >>>>>> Skybuck. >>>>>> >>>>> -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/git-users/98333f8a-091a-46b5-bce5-f5b2d95b5ae8n%40googlegroups.com.