Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The proper way to merge all commits in public into one commit (i.e. merging several commits to one, or removing individual commits entirely, etc.) is to use <code>git rebase -i</code>. So what you would do is (assuming the first commit has a tag <code>start</code> as your graph indicates):</p> <pre><code>git checkout public git rebase -i start </code></pre> <p>An editor window comes up where you can edit the order of all the patches simply use <code>squash</code> for all your patches. After you saved that file and closed the editor, <code>git</code> will recombine your patch history as requested. Of course, the master branch will not change its history at all.</p> <p>To rename your current master as unsafe and start all further development on public, I would do:</p> <pre><code>git checkout -b unsafe master # &lt;- creates a new branch "unsafe" git checkout master git reset --hard public # &lt;- forces master branch to point to public </code></pre> <p>If you don't create the <code>unsafe</code> branch, the hard reset will loose all commits in master and you won't be able to (easily) access them any more. So make sure you really created that branch.</p> <p>An alternative would be to rename <code>master</code> to <code>unsafe</code> and then create a new master branch:</p> <pre><code>git branch -m master unsafe # renames master to unsafe git checkout -b master public # creates new branch master as a copy of public </code></pre> <p>Both should result in the exact same branch structure. (Granted, the second does not have that danger of loosing the history...)</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload