Using git pull --rebase is a great way to avoid those awkward looking commits of Merge branch 'development' of in the list of commits. Very difficult to read the actual deltas. Performing a Git rebase helps solve this. However, from time-to-time I've received conflicts and could not figure out how to fix the rebase and carry on. Scariest moments of my life. Luckily I've been able to recover from this.
Before performing the git pull --rebase you would have committed your code locally, so it is not lost.
When you're in the awkward scenario of temp rebase branch, here are my steps of recovery:
Replace [commit id] with your hash. This leaves you with the awkward Merge branch commit, but oh well. No code lost and you're good to go.
As a funny aside I like to pronounce "reflog" as re flog instead of ref log. Probably because I just felt like I received a good flogging... Published on Apr 15, 2019 Did you enjoy this article? If you did here are some more articles that I thought you will enjoy as they are very similar to the article
that you just finished reading.
No matter the programming language you're looking to learn, I've hopefully compiled an incredible set of tutorials for you to learn; whether you are beginner
or an expert, there is something for everyone to learn. Each topic I go in-depth and provide many examples throughout. I can't wait for you to dig in
and improve your skillset with any of the tutorials below.
Git reflog to the rescue
Related Posts
Tutorials
Learn how to code in HTML, CSS, JavaScript, Python, Ruby, PHP, Java, C#, SQL, and more.