After making changes to files already tracked git
, I usually do a:
git commit -a -m "a message describing what you did"
followed by
git push origin master
to commit, and then click all the changes in my Github account. However, the first command does not work to add or delete files. To do this, I would first have to type:
git add -A
as indicated here: How to commit and push all changes, including deletion? .
In this other Git question, commit all files with a single command, the accepted answer indicates that the only way to apply full commit (i.e. including files added or deleted, not just edited), and then pressing it combined with the command &&
as follows:
git add -A && git commit
which in my case will look like this:
git add -A && git commit -a -m "a message describing what you did" && git push origin master
Now for the question (s): is this big command right? Is there a way to create a new team git
to apply these three teams at the same time? In addition: is this due to the merger of teams recommended or discouraged? If yes, indicate the reason.
Edit
I immediately regret this decision: Edit the last message with the commit pressed .