I have been working on a repository on my pc for a couple of weeks and I have 11 commits on it. now, I just got a MacBook and I want to move my working environment there. How do I move my repositories there without losing the history of the repo. Do I just copy and paste the folders using an external drive and continue working there?
Asked
Active
Viewed 319 times
1 Answers
1
Yes.
The information of a git repository are stored in the (invisible) sub-folder .git
.
If you move the entire repository folder then all your repository's history should be preserved.
The only thing not saved in that folder are system/user-wide configuration, e.g. your user.name and user.email - if you also want to transfer your configuration, have a look at How to locate the git config file in Mac

Jay
- 3,640
- 12
- 17