Reputation: 9219
If the .git folder that was created using linux is copied to windows, will it work?
Upvotes: 9
Views: 872
Reputation: 116
Yes I am using it with gitflow extension on Linux and msysGit + TortoiseGit on Windows it uses the .git
folder well.
But be very careful with the inverse. By copying git folders from Windows to Linux there will be :
MsysGit manages it well on Windows but on Linux before commit/push you will have to : use dos2unix for 1. and chmod 644
on files for 2. git status
and git diff
will help you.
Upvotes: 2
Reputation: 618
Yes, it will be okay - I work like this myself - on two computers with Linux and Windows .git
directory is synced by dropbox, and there are absolutely no problems at all :)
btw - .hg
works equally well.
Upvotes: 9
Reputation: 2888
It is, I've worked with the same repo from both Windows and Linux boxes and it works fine. When you work in Git Windows, everytime you push to a remote Linux repo, git will convert the line ending from Windows to Linux style.
Upvotes: 0