How-to articles, tricks, and solutions about GIT

How to List Git Branches that Contain a Given Commit

Here, you can find a short tutorial on how to list branches that contain a given commit in Git. Find the answer to one of the most common questions in Git.

How to Make the Current Git Branch a Master Branch

In this snippet, we will go through an example of making the current git branch to a master. Follow the steps below to do it in an easy and fast way.

How to Pull the Latest Git Submodule

Learn more about git submodules in this short tutorial. Here you will also find out how to pull the latest git submodule in a relatively fast and easy way.

How to Undo Git Rebase

In this short tutorial, you will find information about undoing a git rebase in a quite straightforward way. Do it by just following these simple steps.

How to Undo Git Stash Pop Resulting in Merge Conflict

This tutorial will give the answer to the question of undoing git stash which results merge conflict in detail. Read about stashing and merge conflicts.

How to Unstage a Deleted File in Git

This tutorial will give the answer to the question of unstaging a deleted file in Git in a right and easy way. Also, read about git checkout and git reset.

How to Remove Files from Git Commit

This tutorial will help you get the answer to the question of removing files from git commit based on different scenarios. Also, read about used commands.

How to Import Multiple Projects into a Single Git Repository

In this tutorial, you will get an answer to your problem of managing multiple projects into a single repository step by step with the most used commands.

How to Find a Deleted File in the Project Commit History in Git

This tutorial will help you find the answer to the question of finding a deleted file in the project commit history. Get the code and get the work done.

How to Make the Current Commit the Only Commit in a Git Repository

In this tutorial, you will get the codes of how to make the current commit as an initial one in one repository. The case of submodules is also discussed.

How to Reconcile Detached HEAD with Master/Origin in Git

The tutorial covers about how to reconcile the detached HEAD with master/origin. Get to know what is HEAD and give a solution to your problem immediately.

How to Delete Remote Git Tags

Reading the following tutorial you will get familiar with tagging in general, the usage of the git tag command, and two ways of removing the remote tag.

How to Fetch All Git Branches

In this tutorial, you will get an answer to your problem of fetching the local and remote branches with the simplest way using Git most used commands.

How to Compare Local and Remote Git Branches

In this tutorial, you will get useful information about the simplest way of comparing the difference between the local and remote branches step by step.

How to Undo Git Reset

In this tutorial, you will learn about the short and more detailed methods of undoing git reset. Also, get familiar with the concept of the three trees.

How to Delete Already Merged Git Branches

Know how to delete already merged git branches to keep your repository clean and easy to browse and how to exclude branches you do not want to delete.

How to Solve Permission Denied (publickey) Error when Using Git

This tutorial provides the answers of solving the permission denied error when using Git. Also, get useful information about the public key autentication.

How to Clone into a Non-Empty Git Directory

This tutorial provides an easy way of merging the files of the remote repository into the local non-empty directory. Read and find useful information.

How to Delete Git Repository Created with Init

In this tutorial, you will find out two methods of deleting the git repository created with the git init command for Linux and Windows operating systems.

How to Merge Two Git Repositories

In this tutorial, you will find out how to merge several projects in a single repository without losing history. Get the essential information and codes.

How to Move the Recent Git Commits to New or Existing Branch

This tutorial provides you with useful information about how to move the latest commits to a new or existing branch, without changing the original branch.

How to Clone Including Git Submodules

Get answers to the problem of cloning the parent repository so as the submodule folder does not stay empty. Get several methods regarding the Git versions.

How to Discard Unstaged Changes in Git

The tutorial provides you with information you need to discard the unstaged changes in the working copy. Find several ways of discarding and get the codes.

How to Delete Commits from a Branch in Git

In this short tutorial, you will find out how to delete commits from a branch in Git. Just follow the steps below to undo the things you didn’t mean.

How to List All the Files in a Git Commit

The following tutorial shows two ways of formatting files in a commit. You can find a preferred and less preferred ways with the explanation in detail.