@@ -387,6 +387,7 @@ convert many commits to one commit. To do this, use the rebase command:
387
387
.. code-block :: bash
388
388
389
389
$ git rebase -i upstream/master
390
+ $ git push --force origin BRANCH_NAME
390
391
391
392
After you type this command, an editor will popup showing a list of commits:
392
393
@@ -400,29 +401,7 @@ To squash all commits into the first one, remove the word ``pick`` before the
400
401
second and the last commits, and replace it by the word ``squash `` or just
401
402
``s ``. When you save, Git will start rebasing, and if successful, will ask
402
403
you to edit the commit message, which by default is a listing of the commit
403
- messages of all the commits.
404
-
405
- Examples for "squashing" the first and the second commit into one commit:
406
-
407
- .. code-block :: text
408
-
409
- squash 1a31be6 first commit
410
- squash 7fc64b4 second commit
411
- pick 7d33018 third commit
412
-
413
- or
414
-
415
- .. code-block :: text
416
-
417
- s 1a31be6 first commit
418
- s 7fc64b4 second commit
419
- pick 7d33018 third commit
420
-
421
- When you are finished, execute the following push command:
422
-
423
- .. code-block :: bash
424
-
425
- $ git push --force origin BRANCH_NAME
404
+ messages of all the commits. When you are finished, execute the push command.
426
405
427
406
.. _ProGit : http://git-scm.com/book
428
407
.. _GitHub : https://github.com/signup/free
0 commit comments