On Sun, Oct 20, 2019 at 06:06:30PM +0200, Gerald Pfeifer wrote: > On Wed, 9 Oct 2019, js...@gcc.gnu.org wrote: > > +<li>Use "<code>git commit</code>" and "<code>git push origin > > +master</code>" to check in the patch.</li> > > I will admit I made a couple of first commits without reading those > details and just used a plain "git push". > > Is there any problem with that, any drawback? > > Or could we simplify those instructions?
Neither command works in all cases, and both work in the simpler cases. "git push" will push what you have configured to push for the current branch you are on. If you are on your local "master", and you have followed the simple instructions above, that will probably push your local "master" to the "master" on your remote "origin" (that is, "git push origin master:master"). "git push origin master" makes it explicit what remote you want to push to, and what local branch you want to push, but not the remote branch you want to push to. "git push" is slightly more dangerous, but git will prevent you from doing most dangerous things, so that's alright. The instructions as-is are a good habit to get into, and for more advanced things you *do* need to name your remote and branches; you'll have to learn them some time, why not now. Both commands are fine, if you have your changes on local master. However. *Never ever* use "git push -f". Don't drive without safety belts. (Use "+" when you want to force push a branch, don't force push the world). Segher