Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is .git folder crossplatform?

Tags:

git

linux

windows

If the .git folder that was created using linux is copied to windows, will it work?

like image 402
André Puel Avatar asked Apr 20 '12 13:04

André Puel


People also ask

Is .git folder shared?

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.

Is it safe to share .git folder?

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.

What is .git folder in git?

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.

Is .git folder local?

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.


1 Answers

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.

like image 168
Bugari Avatar answered Sep 23 '22 15:09

Bugari