avatarTeri Radichel

Free AI web copilot to create summaries, insights and extended knowledge, download it at here

1487

Abstract

h the last git release, git-rebase gained a new option…</h3></div> <div><p>web.archive.org</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*WE58QF2y6WGP7X3R)"></div> </div> </div> </a> </div><p id="6355">Type this command to open your commits in an editor:</p><div id="f477"><pre><span class="hljs-attribute">git</span> rebase -i HEAD~<span class="hljs-number">10</span></pre></div><p id="20b9">Use various commands to modify the git commit history:</p><div id="7ced"><pre><span class="hljs-comment"># pick = use commit </span> <span class="hljs-comment"># edit = use commit, but stop for amending </span> <span class="hljs-comment"># squash = use commit, but meld into previous commit</span></pre></div><p id="60bd">The thing is, when I tried to use it initially, I tried to replace pick with squash on a whole bunch of lines at once and it mangled my local repo.</p><p id="1baa">If you’re going to use this command, it’s safer to squash one line at a time.</p><p id="a50f">When you save (:wq!) it appears you have to do it twice.</p><p id="86d4">Then you can commit your changes as normal but it forced me to do a pull first.</p><p id="ac23">Worked like a charm with those few tips.</p><p id="950f">Follow for updates.</p><p id="4a3a">Teri Radichel | <i>© <a href="https://2ndsightlab.com/?source=post_page----------------

Options

-----------">2nd Sight Lab</a> 2022</i></p><div id="8b5f"><pre><span class="hljs-section">About Teri Radichel:

⭐️ Author: Cybersecurity Books
⭐️ Presentations: Presentations by Teri Radichel
⭐️ Recognition: SANS Award, AWS Security Hero, IANS Faculty
⭐️ Certifications: SANS ~ GSE 240
⭐️ Education: BA Business, Master of Software Engineering, Master of Infosec
⭐️ Company: Penetration Tests, Assessments, Phone Consulting ~ 2nd Sight Lab</pre></div><div id="caae"><pre><span class="hljs-section">Need Help With Cybersecurity, Cloud, or Application Security?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</span>
🔒 Request a penetration test or security assessment
🔒 Schedule a consulting call
🔒 Cybersecurity Speaker for Presentation</pre></div><div id="46f6"><pre>Follow <span class="hljs-keyword">for</span> more stories like <span class="hljs-keyword">this</span>:

❤️ Sign Up my Medium Email List ❤️ Twitter: <span class="hljs-meta">@teriradichel</span> ❤️ LinkedIn: https:<span class="hljs-comment">//www.linkedin.com/in/teriradichel</span> ❤️ Mastodon: <span class="hljs-meta">@teriradichel</span><span class="hljs-meta">@infosec</span>.exchange ❤️ Facebook: 2nd Sight Lab ❤️ YouTube: @2ndsightlab</pre></div><figure id="550c"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*4oxP4LXk8l8c3mpRvO7ejg.png"><figcaption></figcaption></figure></article></body>

Git Rebase

Every mess up your git commits?

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

⚙️ Check out my series on Automating Cybersecurity Metrics. The Code.

🔒 Related Stories: Git | GitHub

💻 Free Content on Jobs in Cybersecurity | ✉️ Sign up for the Email List

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Every messed up your git commits and wanted a do-over? I have….

That’s what git rebase is for and I found this super helpful page that explains how to use it:

Type this command to open your commits in an editor:

git rebase -i HEAD~10

Use various commands to modify the git commit history:

#  pick = use commit 
#  edit = use commit, but stop for amending 
#  squash = use commit, but meld into previous commit

The thing is, when I tried to use it initially, I tried to replace pick with squash on a whole bunch of lines at once and it mangled my local repo.

If you’re going to use this command, it’s safer to squash one line at a time.

When you save (:wq!) it appears you have to do it twice.

Then you can commit your changes as normal but it forced me to do a pull first.

Worked like a charm with those few tips.

Follow for updates.

Teri Radichel | © 2nd Sight Lab 2022

About Teri Radichel:
~~~~~~~~~~~~~~~~~~~~
⭐️ Author: Cybersecurity Books
⭐️ Presentations: Presentations by Teri Radichel
⭐️ Recognition: SANS Award, AWS Security Hero, IANS Faculty
⭐️ Certifications: SANS ~ GSE 240
⭐️ Education: BA Business, Master of Software Engineering, Master of Infosec
⭐️ Company: Penetration Tests, Assessments, Phone Consulting ~ 2nd Sight Lab
Need Help With Cybersecurity, Cloud, or Application Security?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
🔒 Request a penetration test or security assessment
🔒 Schedule a consulting call
🔒 Cybersecurity Speaker for Presentation
Follow for more stories like this:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
❤️ Sign Up my Medium Email List
❤️ Twitter: @teriradichel
❤️ LinkedIn: https://www.linkedin.com/in/teriradichel
❤️ Mastodon: @teriradichel@infosec.exchange
❤️ Facebook: 2nd Sight Lab
❤️ YouTube: @2ndsightlab
Git Rebase
Error
Fix Github Checkin
Git
Repo
Recommended from ReadMedium