I have a project in Eclipse that is associated with an old repository in Gitlab. The branch being used is called Test.
I created a new repository in Gitlab (and it only has the README.md file in it). It only has one branch: master.
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).
How can this be done?
TIA
Update
@Rizwan - thanks for the info. I did the following:
cd to the directory with the code
#initialize the repository
git init
#add reference to the repository I needed
git remote add origin "[email protected]:WORK/<my-repository>.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
There was another message I used as a base (but I cant find it now)
TIA
We can directly perform this operation in Eclipse itself.
Goto - CurrentProject(Right Click) -> Team -> Remote -> Configure push to upstream -> Change(URI)
This might help
cd /path/to/repo
git remote -v
git remote set-url origin [email protected]:root/testproject.git
Refresh/Clean Build your Eclipse project
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With