简体   繁体   中英

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM