Re: Newbie falls at first hurdle
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:06
Alan Chandler [off-list ref] writes:
The editor file that came up with this listed all the files it was going to commit INCLUDING some .files from the root directory (I am using eclipse, so I had files like .project and .classpath there). It says in the Documentation that git ignores those - has it done?
We ignore '.git' but we let you have paths starting with dots these days -- the change happened quite a while ago and if some documentation still says we do not, then you spotted a documentation bug.
I then deleted these directories again and then attempted to check them out from the repository with git checkout master None of these directories has been created in my working directory.
After you told git about those files, you removed them from your
working tree. "git checkout" tries not to lose your local
changes -- which means that what you removed will be left
removed (so are what you locally edited).
$ git checkout -f
would give them back, but you would also lose other local
changes if you have some.