Odaym
Odaym

Reputation: 1858

Moving repo to another computer

I've moved a repo from computer A to computer B. I've verified that the commits waiting to be pushed are still there on B, but the whole repo (every single file) is unstaged. I don't want to add them and push them as a commit because I have not changed every single file from when I copied the repo till I pasted it. When I moved the repo it only had the commits pending to be pushed, not changes.

I have seen this question, but it didn't help with this.

Upvotes: 7

Views: 3646

Answers (1)

palazzo train
palazzo train

Reputation: 3409

On the copied repo folder of computer B, do

git reset --hard HEAD

if you just want to copy the committed code from A to B but leave behind the local modification on B, after copy the repo folder from A to B.

Upvotes: 9

Related Questions