How to change the VS2019 project hooked up to an existing GithHub repos - github

I'm making an app in C# but, something happened with the dependencies and I want to make a new project and push that project to an existing repo. I've tried fixing the dependencies on the existing, broken project and it doesn't work.
How to reproduce:
You have a project, connected to a GitHub repo and you want to change the project hooked up to the repo.

Related

Pulling a project from GitHub with EGit

I've setup a private GitHub account to make it easier for me to work on the same project on both my desktop and my laptop when I'm not at home. The project was originally on my laptop, so I configured EGit to push and commit to my private repo. That worked successfully, and now I can see my project when I log onto GitHub. I'm now trying to pull that project onto my desktop. I did the same configurations , and in the Git Repository View within Eclipse I can see Remotes->origin-> the Push/Fetch streams. I tried to fetch, and that placed an origin/master branch under git\branches\Remote Tracking. But I can't seem to do anything with it.
I'm not sure what to do next, or if I made a mistake somewhere?
Now just right click it and Create branch.... This will make a local branch that will track this remote branch. When you push Eclipse should automatically configure everything so that origin/master will get updated.
Check out the local branch to start working.
UPDATE:
To import the project from working copy select the following:
If you have checked in your configuration files (.project, .classpath etc) you will get a list of all available projects in the repo to import to workspace. If not you will need to import them manually.

How can I start a project on GitLab repo with Eclipse?

Good morning.
I just create a GitLab private repo to work in a project with some people. When I add GitLab repo to Eclipse, it says there aren't projects (and it's true). I would know how to create a project and sync with online repo so other members can see my project and codes.
I tried to start a project in git\repoName\ folder, then right-click and choose Team->Commit, but changes wouldn't save (in gitLab repo's website, it says "Repo is empty").
I tried to follow some online guides, but without success.
Sorry for bad english!
Eclipse 4.2 and newer, comes default with (E)Git installed. There is a good Eclipse git tutorial from Vogella.
Create a GitLab git repository
Log into GitLab
Create a project / git repository
Copy the https url from the project, used for cloning
Adding an GitLab git repository in Eclipse
Open the Git perspective in Eclipse
Use Clone existing Git repo, as shown in Using git repository view
Now all the git functionality from Eclipse can be used.
I assume you have a cloned repository available in Eclipse (eGit) that is empty. If not, follow the steps in the answer from Verhagen.
By now, you have a cloned repository that is marked with "[NO HEAD]", indicating that no commit has been made.
Start creating a new project by using your project type of choice; I'll use Java project for simplicity: File menu > New > Java project
in the New Java Project wizard un-tick the "Use default Workspace location" checkbox; instead, choose the directory where you cloned your empty GitLab project, and append the name of the project (this is to make Eclipse create a directory inside the repository, just in case you later want to create more projects in the same repo).
Fill in the wizard as you usually do. When you are done with the different steps, you'll have a new project, that is also marked with "[NO HEAD]"
Create some source files you want to share (e.g. HelloWorld.java)
Synchronize workspace (right click on the new project > Team > Synchronize workspace) you will see that now there are files to commit. Pay attention to those files, since some of them ( .gitignore, and maybe .classpath, .project,.settings directory... depending on how you share your projects) you'll want to add to the .gitignore.
right click on the files you want to commit, fill in the commit message and click "Commit and Push". Click Next
Since it is a new repository, you'll have to configure the Push action. I selected HEAD as source and HEAD as destination. You might want to do the same, at least for this first commit+push; later on, you might choose to add some specs for branches, etc.
The Push Confirmation will show you that the new branch master:master will be created.
Both project and repository lost the "[NO HEAD]" marking
You can check gitlab site to confirm your files are there.

Confusing Eclipse and Github interactions

We are trying to use Eclipse and github on a project, and it is proving to be a real burden because we do not understand how it works. It is difficult to formulate a single question, but let's start with one case:
We have a project in Eclipse that is on github. Several developers are sharing the archive. We learn that we want to create a Java EE project rather than a Java project. We do not want to change the name of the project. How can this be done?
Further, not knowing this, we tried to change the name from ProjNamet to ProjName2.
When creating a project on git, Eclipse creates it in a local directory:
c:/Users/username/git
In order to push that project out to github, we executed:
git remote add origin github.com/author/projname
git push origin master
As far as we can see, the project appears to be successfully pushed out to github.
In addition to source code, there is:
.project
.gitignore (which just ignores the build directory)
.classpath
.settings
But when I right click on the repository and try to import projects from it to my computer, Eclipse failed
deleting the directory, and clicking on File->import.. and importing from the repository works.
I do not see what the difference is between the one that worked and the one that did not.
Try this:
git remote add origin github.com/author/projname
git push origin master

adding a new project to an existing remote in git which has content already

I have a remote in git
It contains a project already.
I'm using eclipse and sourceTree.
how can I add a newly created project to it?
by project I mean another code folder which depend on the already uploaded project.
You are probably going to run into at least one problem here: Eclipse will expect the existing project in the remote to be rooted at the root of repository (which I assume it currently is?)
I would just create a new repository, it's going to be simpler. On GitHub you can create an organization to group related repositories together.

iphone: How to add current project files o SVN?

I have developed a part of application now I want to add my project to SVN repository for that
i did
File->Source Control->Repositories
Add Repositories
Added repository sccessfully, but when in project root I right clicked to add project to repository it showed all disable option of source control.
How can I add my project to SVN repository, please help
while repository is added
Would you not just place all of your files into your trunk manually and open the project from there, and then set up your repository in Organiser. The files would all already be there, and then you can right click on the file you have changed and commit it from there.
I also like to use public repositories such as Google Code to store my repositories, which is especially helpful in case of data issues when working with lots of people on the one SVN project.