Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

how to make push work without deleting exitiing file

Hello Sir,

i have problem with push command , when i try to push a file to bitbucket

it's give me an error

 

$ git push origin master
To https://bitbucket.org/O-Abdelaaziz/testcmd.git
 ! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to 'https://O-Abdelaaziz@bitbucket.org/O-Abdelaaziz/testcmd.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

 

the repositrory have just the md file , when i try to force push using this command

$ git push origin master -force

it's work but the md file it deleted , so im doing right here ? or what?

i want to push without deleting any thing.

can you help me.

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

Powering DevOps with Bitbucket Server & Data Center

Hi everyone, The Cloud team recently announced 12 new DevOps features that help developers ship better code, faster   ! While we’re all excited about the new improvements to Bitbucket ...

1,849 views 0 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you