Elena' s AI Blog

Git Survival Guide

Elena Daehnhardt

Midjourney AI-generated art
Image credit: Illustration created with Midjourney, prompt by the author.
Image prompt

“An illustration representing cloud computing”

Git Survival Guide

This series is a practical guide to Git and GitHub workflows, with a focus on the issues that actually slow people down: diverged histories, recovery, safe collaboration, and confident troubleshooting.

Series Progress

9 of 9 posts published


All Posts in This Series

Part 1: Git Commands and a Contribution Workflow

I have created a list of arguably the most useful Git commands and an example contribution workflow. I have also found a great JavaScript application for learning Git branching!

Git Commands and a Contribution Workflow

Part 3: Storing Your Local Project to GitHub

This post shows you how to create a Git repository for your local (Python) project and push it to GitHub using the command line and a personal access token. Following these steps, you can securely host your code on GitHub for easy access and collaboration.

Storing Your Local Project to GitHub

Part 4: Collaboration in GitHub

In this post, I have covered GitHub collaboration when working with other team members. Git branching, forking, pull requests, and issues were briefly explained.

Collaboration in GitHub

Part 5: Leveraging Git Tags

Git tags are useful for marking specific points in a repository's history, such as release points or important milestones. They provide a way to easily reference and access specific versions of your codebase. Let's dive deeper into the details of working with Git tags.

Leveraging Git Tags

Part 6: Git Log

The git log command allows you to view your project's history by listing commits with their authors, dates, and messages. It's essential for debugging, tracking changes, and understanding your project's evolution. It is indeed my favourite Git command.

Git Log

Part 9: Reverting Commits in GitHub

This post is about reverting your changes in GitHub. Sometimes it's good to step back and think about something different, right? With the use of git reset, revert and rebase we can remove changes from commits or even history.

Reverting Commits in GitHub

Part 10: Restoring deleted files in Git

Recently, I had a glitch, and many images were deleted from my Git repository. I am fixing it now. See how I do it here.

Restoring deleted files in Git

Part 11: Preserve your local changes on Git Pull

When we get the Git error on pull - your local changes to the following files would be overwritten by merge - it means that you have some uncommitted changes in the working directory. Git cannot perform the merge operation because those changes would be lost or overwritten during the merge process. Read some good solutions to resolve this error while keeping local changes.

Preserve your local changes on Git Pull

Part 12: Git Failed to Push Some Refs

I was away from my big MAC computer and did some repository updates using my laptop. When arriving back, I could not push an update from my big MAC computer. Git updates were rejected because my current branch is behind. That happens quite often when we should integrate the remote changes before pushing git updates. Herein I am sharing possible solutions in detail.

Git Failed to Push Some Refs

Getting Started

New to Git? Start with Part 1: Git Commands and a Contribution Workflow.

All Posts