Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to delete "origin/origin/master" [duplicate]

Tags:

git

git-branch

Ok, I've created an origin/origin/master branch and I've pushed it. I'm scared to do some remove operations. Whan can I do? Is it safe to run a remove operation?

like image 909
interlude Avatar asked May 22 '14 16:05

interlude


People also ask

How do I delete my origin master branch?

Deleting remote branches To delete a remote branch, you can't use the git branch command. Instead, use the git push command with --delete flag, followed by the name of the branch you want to delete. You also need to specify the remote name ( origin in this case) after git push .

How do you delete a main origin remote?

Steps to delete remote Git branches Issue the git push origin –delete branch-name command, or use the vendor's online UI to perform a branch deletion. After the remote branch is deleted, then delete the remote tracking branch with the git fetch origin –prune command.

What is the meaning of origin origin Master?

origin master is the branch master on the remote origin. origin/master ( A representation or a pointer to the remote branch) This is incorrect... origin master is not a branch... it is in fact two separate things, "origin" (a remote) and "master" (a local branch). The state of the remote master branch, is present locally, right?

What is the difference between origin and origin/Master in Git merge?

Here, origin is the remote repository and origin/master is the master branch on the remote repository. So what two branches are being merged? Thanks in advance! All parameters to 'git merge' in this case are branches that you're merging from, i.e. source branches. You're always merging to the current branch.

How to reset repository from origin to remote Master?

First we need fetch origin, which is slightly different from pull, as it will not try to merge. To reset repository to our remote master we need to reset it hard specifying reset point to origin/master .

Is the origin/master a local or remote master branch?

Given the fact that you can switch to origin/master (though in detached state) while having your network cable unplugged, it must be a local representation of the master branch at origin. In the answers above and below, people say origin/master is the remote master branch.


1 Answers

Don't worry, you can always go back with git. Make sure you have your master branch locally, then try this one:

git push origin :origin/master

It will delete origin/master branch on a remote "origin".

If you want to be supersafe, rename your remote from "origin" to "temp", then do:

git push temp :origin/master

like image 113
Adam Adamaszek Avatar answered Oct 19 '22 23:10

Adam Adamaszek