If the .git folder that was created using linux is copied to windows, will it work?
If your question is "Does the . git folder get added to the repository?" then the answer is no. The . git folder is local to that specific checked out location and is not part of the repository that is shared.
Security. Making public the . git directory is just like make public your repo. If there's no sensitive information in your repo (keys written to hooks or remote-paths what contains secrets, files with plain-text passwords) then it is ok to share.
The . git folder contains all information that is necessary for the project and all information relating commits, remote repository address, etc. It also contains a log that stores the commit history. This log can help you to roll back to the desired version of the code.
git folder is the directory which is created when you do git init (in case of a new project) or you do git clone (in case of pulling a project from somewhere else). Without . git , your project is a local project and not a git project, that means you cannot perform any git operations.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With