Hello,
This syntax is correct
git push repository :branch
In this case, repository is referring to the alias you configured when you setup your git remote initiall or recently. The default if you don't specify one is origin. In other words, your command should look like:
git push origin :{branch_name}
You can confirm what the alias is by looking at the contents of the file .git/config or by running the command
git remote -v
In that listing you'll see the alias and URL. That is the configuration of the URL alias to your remote. For more information about git remotes, see the official documentation.
If you still have more questions about the usage of git in general, please ask it here. We'd love to continue to share this information with the community!
Hi Marcus,
Sorry but that command gives the following error:
David-Chamberss-MacBook-Pro:ZS1 davidchambers$ git push origin :2013_Develop_ZS1_into_MIDI_Metrics_Tool_
Password:
error: unable to push to unqualified destination: 2013_Develop_ZS1_into_MIDI_Metrics_Tool_
The destination refspec neither matches an existing ref on the remote nor
begins with refs/, and we are unable to guess a prefix based on the source ref.
error: failed to push some refs to 'https://Zoabis@bitbucket.org/Zoabis/zs1.git'
:-(
Any ideas?
Thanks for trying
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This means that git doesn't know what branch you are referring to. I took a look at your repo, and it would appear that your branches full name includes (free) in it. You can check this by running
git branch -a
Maybe try copy/pasting the exact full name of the branch? When you are pushing up this change, keep in mind the ref is quite literally a file with a reference to a commit sitting on the remote server. You need to use the exact name when referring to it.
Note with the ( and ) you may need to use \( and \) as escape characters if you are using OSX or Unix like shells.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is that your main branch? You can't delete the main branch, you need to choose a different branch as the main branch then you can use the command you mentioned.
All the best
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If that's your Main branch you can't delete it. You'll need to go to the admin section of your BitBucket repository and select a different branch for the main branch.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No, my main branch is Master.
I cd'ed to the local directory with my project and tried the follwoing and got these errors:
andrea-xps:ZS1 davidchambers$ git push ZS1 :2013_Develop_ZS1_into_MIDI_Metrics_Tool_
fatal: 'ZS1' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
andrea-xps:ZS1 davidchambers$ git push Zoabis/zs1 :2013_Develop_ZS1_into_MIDI_Metrics_Tool_
fatal: 'Zoabis/zs1' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
andrea-xps:ZS1 davidchambers$
I thought this was the URL of my repo:
https://bitbucket.org/Zoabis/zs1
??
Thanks for your help so far
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hmm..this is actually beyond my BitBucket experience :(. I suggest you consult our BitBucket support team at support.atlassian.com under the bitbucket project. Am sure you'll get the help you need.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.