I am new to git (mysysgit) and I am trying to get it working on my laptop. I'm using windows 7. I have been able to use most of the commands but i don't think it's being saved anywhere. I used git init, git add ., git commit. All seemed to work fine but I am not able to find my .git folder anywhere. After using SmartGit I see nothing is being saved. What could be the problem?
If git inited, added and committed the folder with no problem then there is a .git folder there. If you can't see it in Windows Explorer then you need to enable the showing of hidden and system files and folders in Windows Explorer.
The free eBook "Pro Git" is really helpful for getting up to speed with git. There is also another free one called "Git Succincly" that you have to register for but it's an undercut to Pro Git and I've not had any spam or annoying followups from it.
Hope that helps.
With git 2.9, the .git/
folder remains hidden by default, but now has a new config:
git config core.hideDotFile dotGitOnly
That new setting allows to configure how to hide or not dot files.
See commit ebf31e7, commit f30afda (11 May 2016) by Johannes Schindelin (dscho
).
(Merged by Junio C Hamano -- gitster
-- in commit bfc99b6, 17 May 2016)
mingw
: introduce the 'core.hideDotFiles
' setting:On Unix (and Linux), files and directories whose names start with a dot are usually not shown by default. This convention is used by Git: the
.git/
directory should be left alone by regular users, and only accessed through Git itself.On Windows, no such convention exists. Instead, there is an explicit flag to mark files or directories as hidden.
In the early days, Git for Windows did not mark the
.git/
directory (or for that matter, any file or directory whose name starts with a dot) hidden. This lead to quite a bit of confusion, and even loss of data.Consequently, Git for Windows introduced the
core.hideDotFiles
setting, with three possible values: true, false, anddotGitOnly
, defaulting to marking only the.git/
directory as hidden (dotGitOnly
).The rationale: users do not need to access
.git/
directly, and indeed (as was demonstrated) should not really see that directory, either.
However, not all dot files should be hidden by default, as e.g. Eclipse does not show them (and the user would therefore be unable to see, say, a.gitattributes
file).In over five years since the last attempt to bring this patch into core Git, a slightly buggy version of this patch has served Git for Windows' users well: no single report indicated problems with the hidden
.git/
directory, and the stream of problems caused by the previously non-hidden.git/
directory simply stopped.
The bugs have been fixed during the process of getting this patch upstream.
The git config
man page now include:
core.hideDotFiles
(Windows-only) If true, mark newly-created directories and files whose name starts with a dot as hidden.
If 'dotGitOnly
', only the.git/
directory is hidden, but no other files starting with a dot.
The default mode is 'dotGitOnly
'.
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