title: In Eclipse java project, change git repository from an old one to a new one
body: <p>I have a project in Eclipse that is associated with an old repository in Gitlab. The branch being used is called Test.</p>
  
  <p>I created a new repository in Gitlab (and it only has the README.md file in it). It only has one branch: master.</p>
  
  <p>I need to change the Eclipse project so that it no longer refers to the old repository (and old branch) but instead - refers to the new repository (with he master branch).</p>
  
  <p>How can this be done?</p>
  
  <p>TIA</p>
  
  <p><strong>Update</strong></p>
  
  <p>@Rizwan - thanks for the info. I did the following:</p>
  
  <pre><code>cd to the directory with the code
  
  #initialize the repository
  git init
  
  #add reference to the repository I needed
  git remote add origin "git@myrepo.com:WORK/&lt;my-repository&gt;.git"
  
  #got what was currently in the repository
  git pull origin master
  
  #added code (not in the repository) 
  git add -A
  
  #commit the code
  git commit -m "first commit with code"
  
  #sent it up
  git push origin master
  </code></pre>
  
  <p>There was another message I used as a base (but I cant find it now)</p>
  
  <p>TIA</p>