Open felipecrs opened 11 months ago
I understand the intent. I've done similar many times to fix accidents with a .gitignore file not being ready or complete.
In general, for this repo, can you consider if there are any ways to adjust the alias in these kinds of ways...?
can you let the user provide a directory (i.e. don't force pwd)?
can you allow stdout through (i.e. don't use /dev/null)?
can you do it without needing set flags (i.e. don't use -x to force the user to see commands, and use && or || instead of -e)?
can you do less (i.e. alias to do the rm cached, which would then let typical add aliases and add commands to work as expected)?
I'm just nervous about the last item:
can you do less (i.e. alias to do the rm cached, which would then let typical add aliases and add commands to work as expected)?
If I remove the git add .
command, then the alias becomes something else completely.
Naming is hard. :-)
As an example, when I first read your alias name apply-gitignore
, what I anticipated was to provide stdin (because apply
can mean apply a function to each input) and append each line to the .gitignore
file.
Of course your code is totally different in purpose.
What happens when you ask some developers for opinions and brainstorms of naming ideas?
Maybe some naming brainstorms could involve concepts of redo or undo, repair or fix, "oops", or similar...?
Oh for sure, I didn't like the name very much but I could not think of something better either.
I am happy to iterate through it as many times as needed. :)
Applies gitignore to all files (remove files which were previously committed already).
What do you think?