Niklas Rosencrantz
Niklas Rosencrantz

Reputation: 26637

How to handle an imported git repo?

I imported my bitbucket (mercurial) repo to github and it seems to work except that I got a new root. When I used to clone from bitbucket, the root was xxx and now my root is yyy/xxx so I must travest one node into the directory and open that directory with pycharm instead. Is there a convenient way for me to arange so that when I clone the gihub repo, I will get the root xxx and not the new yyy/xxx ?

Upvotes: 1

Views: 43

Answers (1)

VonC
VonC

Reputation: 1326766

If you see yyy/xxx when cloning, that means your GitHub repo must have a single xxx folder.

You can, in your local clone, move everything back to root:

cd /path/to/local/clone
git mv xxx/* .
git add -A .
git commit -m "MOve everything to root folder"
git push

Upvotes: 1

Related Questions