mulm
mulm

Reputation: 59

Create Git Branch from local Project folder

there is our little project set-up nicely in VisualStudio and GitLab. One of the developers did´nt know how to branch and started programming locally, decoupled from our repo. Just to be clear, none of us are professional programmers. The question is how can I re-introduce this local folder as a real branch to our existing project. Is there a best practice?

Thanks in advance.

Kind regards, mulm

Upvotes: 0

Views: 313

Answers (1)

Sam Upra
Sam Upra

Reputation: 737

Let me see if I understand this correctly,

You already have a repo, you just want to add a new folder to it. Correct?

Then, you do git init in the parent folder that contains the new folder.

Then git add origin linktoyourrepo

git fetch

git pull origin master.

Then you should get the difference between the two branches.

Also, if this doesn't work, you can move the folder out,

git clone linktoyourrepo

and add the folder back to this repo. This will show the difference in local vs repo.

Hope this helps. Cheers

Upvotes: 1

Related Questions