4 ms·
This article didn't seem to have anything to do with actually switching to Git; it was just a list of SVN commands without the Git equivilant. It did mention on
by Zev 17y ago
This article didn't seem to have anything to do with actually switching to Git; it was just a list of SVN commands without the Git equivilant. It did mention one difference thats worth mentioning:
Since git doesn't keep empty directories, you can add a .gitkeep file to empty directories that you don't want to go away.
However, I thought one of Git's selling points was that it didn't add a file to directories?
And the site adding a link back to the blog when I went to copy and paste that quote? Eugh.
- weaksauce 17y agoI believe one of the selling points of git is that it does not add cruft to each directory as a general rule as it only has one .git directory in the root folder. The only time you would need to do that is if you wanted to keep an empty directory in the structure of the git repo. If checking out an empty folder with a dot file in it is not desired you could always add a post checkout hook to delete them. Though in that scheme you would lose your empty dirs on checkin I would wager(not sure though). Edit: you could probably do a precommit hook too to inject the dot files into the empty directories.
- zacharydanger 17y agoI think you might be missing the point of the article. It's tips for converting a Subversion repository to a Git repository.
- Zev 17y agoI did get that. What I didn't get was why it only showed the relevant svn commands, not how to do the same thing in git for all the items listed (ie: for "Find all authors"; format of an authors file? a link to git's docs? or how about recommending a specific module for "Show all externals"? or, again, a link to where to start looking for one?)
- steveklabnik 17y agoGit doesn't keep track of empty directories by default, so he's just making a file in each directory so that they're there. You could name such a file anything, he's just picking .gitkeep because it's descriptive.