<commit_before>section
    section
        h4 Best practices
    section
        div.
            Release tags &mdash; not branches
        p(class="fragment").
            Tags and branches both point at commits, but tags cannot "move forward".  
            This means you always have a clear understanding of what is deployed.
    section
        img(src="../views/static/tags_branches.png")
section
    section
        div.
            Do not force-push
    section
        div.
            Seriously, don't force-push
        img(class="fragment", src="../views/static/obi-wan-hates.gif")
    section
        div.
            Alright, you can force-push
    section
        div.
            What are some reasons for force-pushing?
        ul
            li(class="fragment") You've push sensitive data to the repository &mdash; a simple revert won't erase history
            li(class="fragment") That's it.
        p(class="fragment").
            If you come up with any others, record your findings in <code>/dev/null</code>
    section
        div.
            How to properly force-push:
        ul
            li(class="fragment") Let the team know prior to pushing
            li(class="fragment"). 
                Make sure no commits will be lost
            li(class="fragment").
                Make sure all branches checked out from the updated branch are also
                updated<commit_msg>Undo the force-push<commit_after>section
    section
        h4 Best practices
    section
        div.
            Release tags &mdash; not branches
        p(class="fragment").
            Tags and branches both point at commits, but tags cannot "move forward".  
            This means you always have a clear understanding of what is deployed.
    section
        img(src="../views/static/tags_branches.png")
section
    section
        div.
            Do not force-push
    section
        div.
            Seriously, don't force-push
        img(class="fragment", src="../views/static/obi-wan-hates.gif")
    section
        div.
            Alright, you can force-push
    section
        div.
            What are some reasons for force-pushing?
        ul
            li(class="fragment") You've push sensitive data to the repository &mdash; a simple revert won't erase history
            li(class="fragment") That's it.
        p(class="fragment").
            If you come up with any others, record your findings in <code>/dev/null</code>
    section
        div.
            How to properly force-push:
        ul
            li(class="fragment") Let the team know prior to pushing.  Everyone will be unavoidably be affected especially if working on the same branch.
            li(class="fragment"). 
                Make sure no commits will be lost
            li(class="fragment").
                Make sure all branches checked out from the updated branch are also
                updated afterwards.
    section
        div. 
            How to recover from a force-push
    section
        p.
            All force-pushes will spit out a similar message
        pre
            code.
                To user@host:repo.git
                + abcdef0...1234567 HEAD -> branchname (forced update)
        p(class="fragment").
            <code>abcdef0</code> refers to the previous commit your HEAD was pointing
            at.  By checking it out, you can restore the state of the repostory prior
            to force-pushing.
        pre(class="fragment")
            code.
                git checkout abcdef0
                git push -f
{'fraction_non_alphanumeric': 0.0716484746711447, 'fraction_numerical': 0.0033585222502099076, 'mean_word_length': 1.6493699036323202, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2452214', 'n_tokens_mistral': 894, 'n_tokens_neox': 853, 'n_words': 349}