@@ -387,6 +387,7 @@ convert many commits to one commit. To do this, use the rebase command:
387387.. code-block :: bash
388388
389389 $ git rebase -i upstream/master
390+ $ git push --force origin BRANCH_NAME
390391
391392 After you type this command, an editor will popup showing a list of commits:
392393
@@ -400,29 +401,7 @@ To squash all commits into the first one, remove the word ``pick`` before the
400401second and the last commits, and replace it by the word ``squash `` or just
401402``s ``. When you save, Git will start rebasing, and if successful, will ask
402403you 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.
426405
427406.. _ProGit : http://git-scm.com/book
428407.. _GitHub : https://github.com/signup/free
0 commit comments