3 ms·
I always start with an empty commit[1] for two reasons: 1. It's slightly harder to edit the first commit afterwards (say, to replace a working title with the a
by Ao7bei3s 11y ago
I always start with an empty commit[1] for two reasons:
1. It's slightly harder to edit the first commit afterwards (say, to replace a working title with the actual project title before publishing, or to fix authorship or whatever).
2. I create a lot of small repos, all the time, so I have a shell alias for "init, commit, add .gitignore, commit".
[1] git init && git commit --allow-empty -m 'Initial commit'
- gioele 11y agoI prefer git init && git commit --allow-empty -m "$(basename (readlink -f .))"
- fjarlq 11y agopwd -P would be equivalent and more portable (POSIX compliant[1]) than readlink -f . which doesn't work on BSD-based systems. [1]: http://pubs.opengroup.org/onlinepubs/009696899/utilities/pwd.html http://pubs.opengroup.org/onlinepubs/009696899/utilities/pwd...