Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Uploading into BitBucket error! Please provide simple steps for a novice being!

Aditya June 4, 2018

Hi, I am having  difficulties in uploading my project into a repository online because i wanted to upload three separate folders into one repository and for many hours i had these errors.  

Could some please provide simplest way possible to upload two separate project folders into one or a simplest method possible.

Thanks

Some errors were 

C:\Users\ADITYA\PycharmProjects\DBSCAN>git commit -m "First Commit"

On branch master

nothing to commit, working tree clean

 

C:\Users\ADITYA\PycharmProjects\DBSCAN>git push -u origin master

To https://bitbucket.org/aditya_d/masterproject827755.git

 ! [rejected]        master -> master (non-fast-forward)

error: failed to push some refs to 'https://aditya_d@bitbucket.org/aditya_d/masterproject827755.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.

Also, please provide a detailed solution and not have you read instructions.I read instructions and an hour was spent but a Youtube video helped me to upload one project in 10 mins. But i made a mistake again. Apologies

1 answer

0 votes
Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 4, 2018

You just need to pull the changes from remote to your local first before pushing the changes.

  1. git pull
  2. git push origin master

If you get a merge conflict after #1, you will have to resolve them and commit the resolved files.

Aditya June 4, 2018

Hi Jobin,

But git pull what?

Aditya June 4, 2018

C:\Users\ADITYA\PycharmProjects\DBSCAN>git pull

There is no tracking information for the current branch.

Please specify which branch you want to merge with.

See git-pull(1) for details.

Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 4, 2018

Do either of the following:

  1. git pull origin master

or

  1. git branch --set-upstream-to=origin/master master
  2. git pull

and see if it helps.

Aditya June 4, 2018

Hi Jobin,

Thanks for that, but I already made a repo and uploaded it. Could you please tell me how could i upload 2 or more folders into an empty or existing repository? I am having headache after reading instructions? I do not like the idea of uploading three times into three different repos.  USB drives are great then.

Thanks

Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 4, 2018

What do you mean by uploading 3 times in to 3 different repos? Here is what is happening:

  1. You created a repo and made changes
  2. You pulled the repo to local
  3. You made some changes in local and committed it. It is still in the local repo
  4. You tried pushing to the remote (server)

At this stage, someone else have already made changes in remote. Or you might have made it from elsewhere. So, you need to pull those changes to your local and merge them before pushing your changes to remote. The steps I gave was for that. The flow changes to:

 

  1. You created a repo and made changes
  2. You pulled the repo to local
  3. You made some changes in local and committed it. It is still in the local repo
  4. Pull from remote to update local to be in sync with remote
  5. Push the updated/merged code, with your changes, to remote

Hope that clarifies.

Aditya June 4, 2018

Hi Jobin,

I understand and that was my mistake then but could you please guide me how can i upload 3 or more folders into a new repository? 

Thanks 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events