SidGabriel
SidGabriel

Reputation: 185

Impossible to add files on BitBucket

I tried many things and watched vids and tutorials but nothing could help. I'm just trying to add an existing project on BitBucket, and observed all steps described. However I keep having the same error :

 ! [rejected]        master -> master (fetch first)
error: failed to push some refs to 
'https://[email protected]/xxx/projet-gsb-php.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

I even deleted my git local folder and followed those steps :

C:\wamp\www>cd GSB_AppliMVC
C:\wamp\www\GSB_AppliMVC>git init
(...)
C:\wamp\www\GSB_AppliMVC>git add -A
C:\wamp\www\GSB_AppliMVC>git commit -m "Initial Commit"
C:\wamp\www\GSB_AppliMVC>git remote add origin https://[email protected]/xxx/projet-gsb-php.git
C:\wamp\www\GSB_AppliMVC>git push -u origin master
(ERROR MESSAGE ABOVE)

I tried to push it on GitLab instead but have exactly the same problem. So there must be something obvious but I really don't know what.

Thank you for your help

Upvotes: 0

Views: 70

Answers (1)

Valeriy
Valeriy

Reputation: 1435

  1. Go to C:\wamp\www
  2. Do git clone https://[email protected]/xxx/projet-gsb-php.git
  3. Copy files you need from GSB_AppliMVC to projet-gsb-php
  4. Push it

Upvotes: 1

Related Questions