0

I am trying to push first draft of my .Net code (written in Visual Studio) to bitbucket. Locally I am working on the master branch.

  1. I created an empty repo in bitbucket.It is empty because i cannot see any read me or license file there
  2. I added the remote url in Visual Studio through Team Explorer-> Settings
  3. I did the code changes and can see the changes in TeamExplorer -> Changes. I am working on Master branch locally.
  4. I committed the changes and then tried to push the code using the push link on sync window

I got an error saying that updates were rejected because

remote contains work that you don't have locally

Also I can see this message in my sync window enter image description here

enter image description here

I then tried git push -u origin master. This gives a message Everything up-to-datAt line:1 char:1

This a different from Issue pushing new code in Github as i don't have any file on remote repository that i can see

kimi86
  • 210
  • 4
  • 12
  • I don't think you did step #2 correctly nor did you `pull `. Anyway the easiest thing to do after #1 is to open Git Bash and perform a `git clone `. That eliminates the need for #2 which can lead to a) getting it wrong b) having _orphaned_ code on _either end_ which sounds like is your case –  Dec 06 '20 at 00:13
  • 1
    Please follow this tutorial. https://www.atlassian.com/git/tutorials/learn-git-with-bitbucket-cloud. Do everything up to and including Step 1. After that you can use VS. This is the best way whenever starting a new repo. After that you can use VS as normal –  Dec 06 '20 at 00:17

0 Answers0