



If you are using a service like Github or Gitorious, you're going to have to use the UI the tool provides you to make the change (see this answer for how to do that in common tools). (Also: you can run git branch to create a new one, if needed, but a default/current branch has to first be selected.)
In such a case, git branch | grep '^*' run from the bare repo directory will print nothing (the default branch has a * to the left of the default-branch name), and you can run the above git symbolic-ref. Deleting a branch in git is done either by running git branch -dIn some unusual scenarios, including when the default branch is renamed, a bare repo has no current, "checked out," default branch. You can, e.g. git/config, that branch still has its remote set to origin and its upstream set. Then, you can use git branch with the -d flag to delete a branch: git branch -d branchname Because of the way Git handles branches, this command can fail under certain circumstances. To change it to another branch, you have to use git symbolic-ref HEAD refs/heads/. Git still has local branch feature/MyGreatFeature, and in. The only changes done in develop23 are lots of git mv's and a couple of git rm's. The re-ordering is done in a branch develop23, this will eventually become the new develop branch, but at the moment we are just testing the effect the reordering has on our application and on the EDI. You can just open up a shell to the bare repo directory and use good old git branch to see what branch origin is currently on (if any see below). Our development is done in a develop branch. You can check this by running the following command in your terminal: git branch The branch you are currently on will be highlighted and marked with an asterisk. If you have direct, filesystem-access to the repo: Step 1: Check Current Branches Before you proceed with deleting a branch, its necessary to know which branches exist in your repository. You're getting rejected because you're trying to delete the branch that your origin has currently "checked out". Fun fact: even remote, bare repositories are on a branch.
