1. Bitbucket Website
  2. Public Issue Tracker
  3. master

Issues

Issue #9284 resolved

Can't Push Project To BitBucket

Liam
created an issue

Hi,

I have tried your guide for pushing an existing project up to BB via Terminal, but it's not working.

cd /path/to/my/repo
git remote add origin https://xxxx@bitbucket.org/xxxx/sitename.git
git push -u origin --all 
git push -u origin --tags 

I am logging in and it does accept my password - but I'm getting this error;

No refs in common and none specified; doing nothing.
Perhaps you should specify a branch such as 'master'.
Everything up-to-date

Yet there is 10 web/php pages to be uploaded. Help?

Comments (22)

  1. Nicolas Venegas

    Hi

    In your local git repository, what is the output of git branch?

    If it lists branches, I would expect git push -u origin --all to have pushed up those branches.

    If you view the repository in Bitbucket do you see any code? Perhaps the branches were previously pushed up and that is why you see the

    Everything up-to-date

    message.

    Cheers

    Nicolas

  2. Mat Walker

    I have exactly the same issue. I have followed the instructions exactly but get the same error.

    'cd /path/to/my/repo' I have changed to my Project root folder as I got 'sh: cd: /path/to/my/repo: No such file or directory' (Which i guessed would happen, but tried to be sure).

    When i type in git push -u origin --all i get Password for 'https://xxxxxxxx@Bitbucket.org': so I enter my login password.

    I then get:- No refs in common and none specified; doing nothing. Perhaps you should specify a branch such as 'master'. Everything up-to-date

    But nothing has happened....?

  3. Programmer Nzsm

    i have same problem. Now i couldn't work with current project because committing and pushing don't work. I create new repo and when try to add existing project have this error No refs in common and none specified; doing nothing. Perhaps you should specify a branch such as 'master'. Everything up-to-date i'm very disappointed because this not good for my work

  4. ipoya

    hi all
    i got same issue. this how I fix this

    1. git init .
    2. git checkout -b master
    3. git commit -am "first commit"
    4. git push -u origin --all
    

    i hope this can help you

  5. Peter Munyasi

    I had the same issue. You have to do an initial commit before pushing. Here is what I did

    1. cd /path/to/my/repo
    2. git init
    3. git commit -am "first commit"
    4. git push -u origin --all
    
  6. Bryan Tejano

    git status

    Changes not staged for commit: (use "git add/rm <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory)

        deleted:    angular-app/templates/Bryan/2nd Edit/canvas.html
    deleted:    angular-app/templates/Bryan/2nd Edit/notefy.js
    deleted:    angular-app/templates/Bryan/Notefy.html
    

    I already tried the some suggestions above still won't work.

  7. Felipe Umpierre

    Hello, I don't know if the people with the problem could resolve.

    But here is how I fix this problem.

    Using this tutorial: https://confluence.atlassian.com/display/BITBUCKET/Import+code+from+an+existing+project

    In your root directory

    git init
    git add .
    git commit - m "message"
    

    Then follow the steps from the initial page of the repo

    git remote add origin https://xxxx@bitbucket.org/xxx/xxx.git
    git push -u origin --all
    git push -u origin --tags
    

    Hope I've helped someone!

  8. Harry Tyldesley

    I had this same issue. I had to run 'git add .', a step I'm used to doing to contribute to repositories but for some reason is missed out in the bitbucket instructions for how to push your first commit - thought perhaps the 'git remote add origin git@bitbucket.org:my-repo-name.git' was meant to replace it, but it seems not. If you're getting this, try running git add . before your git commit.

  9. Mika Välimäki

    did not work for me. finally managed to get this "Counting objects: 3, done. Writing objects: 100% (3/3), 253 bytes | 0 bytes/s, done. Total 3 (delta 0), reused 0 (delta 0) "

    But on bitbucket it stubbornly tells everything is empty :(

  10. Mave

    Felipe Umpierre is right!

    Before you: git add remote origin https//****.git

    Do the following first: git init git add . git commit - m "message"

    Wish you good luck!

  11. Log in to comment