3 ms·
git add . is very useful though. Surely, the first thing to teach here is to always git status before committing? My typical workflow is to git add . to see th
by ratorx 4y ago
git add . is very useful though. Surely, the first thing to teach here is to always git status before committing?
My typical workflow is to git add . to see the mess I’ve made then decide how to clean it up. If I’ve mistakenly added a credentials file, the fix is to add it to the gitignore and unstage it, not JUST unstage it.
Not saying that you shouldn’t do both, but maintaining a gitignore and completely removing the potential problem for other people seems better than pretending your tool is more limited than it is.
- notpushkin 4y agoIf you can tolerate a GUI, Git Cola might be a solution. I'm using it exclusively for some 5 years now – it's lightweight enough, but still makes you think about what you're about to commit. You can add things to .gitignore directly from there, too. https://git-cola.github.io/ https://git-cola.github.io/ Default layout is a bit weird IMO, here's what I'm doing instead: https://u.ale.sh/my-git-cola-screenshot.png https://u.ale.sh/my-git-cola-screenshot.png