DEV Community

[Comment from a deleted post]
Collapse
 
evilrix profile image
evilrix

The point of staging is to allow one to review and organise what's being committed. If you really want to skip it for existing files just use the -a flag when committing.

git-scm.com/docs/git-commit

-a
--all
Tell the command to automatically stage files that have been modified and deleted, but new files you have not told Git about are not affected.

As for pushing when committing, Git philosophy is that you commit little and often, so you usually don't want to combine these steps.

Collapse
 
oluwadareseyi profile image
Oluwadare Seyi

Hi, evilrix. If you read the post again, you'll see it's really just the same syntax. The rules are still followed and all the regular syntaxes are just typed once. This is just a hack and it is optional. For me (and in most use cases), I always know what files have been staged so I just use this instead. Thanks.

Collapse
 
evilrix profile image
evilrix

If that's the case you can just skip the add and commit with -a, as I alluded, above.

 
oluwadareseyi profile image
Oluwadare Seyi

I know that, but the point of the post is really for users to use the same commands they are familiar and comfortable with. Just in case they want to revert to the conventional method. Thanks for your comments.