How-to articles, tricks, and solutions about GIT

How to Find a Deleted Line in Git

This tutorial provides several solutions to when the line once existed in a specified previous git commit was deleted. Choose the right answer for you.

How to Generate SSH key for Git

SSH is a network protocol that helps to login from one computer to another securely. In this tutorial, you will read how to generate the SSH key for Git.

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 Install Git on Ubuntu 18.04

Working with Git starts with installing. This tutorial shows how to install Git on Linux. Get the codes of installing Git from repository and source code.

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.

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 Git Forget About a Tracked File Which is Now in .gitignore

Read this git tutorial and learn how you can force Git to forget about a file that was tracked but is now in .gitignore list.

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 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 Merge a Specific Commit in Git

Sometimes it is necessary to merge a specific commit in Git. The below-given snippet is aimed at showing you how to do it in a rather fast and easy way.

How to Merge Local Uncommitted Changes into Another Git Branch

Read this tutorial and find solution to the question of merging local uncommitted changes from one Git branch into another. Also, read important tips.

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 Git Branch Pointer to Different Commit

Read the tutorial to learn several techniques of moving branch pointer to different git commit without checkout and the essential tips one should encounter.

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 Preview a Merge in Git

This tutorial provides two solutions to the question of previewing the actual merge output in Git. Read about peculiarities of git merge and a lot more.

How to Programmatically Determine if there are Uncommitted Changes in Git

If you’re searching for a right answer to the question of programmatically determining whether there are uncommitted changes or not, check this tutorial.

How to Properly Rename a Directory in a Git Repository

This tutorial will provide you the simplest and appropriate explanation concerning the question of properly changing a directory name in a git repository.

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 Push an Empty Commit in Git

Dive deep into the quirky realm of empty Git commits. Discover why and how to push an empty commit, and when it might just save your day (or at least your code)!

How to Push and Track a New Local Branch to a Remote Repository in Git

Read how to push and track a new local branch to a remote repository in this tutorial. Learn the right commands and make your working process easier.

How to Rebase Git Branch

Don’t waste your time struggling with Git. Here you can find the three commands that you should run to rebase your branch. See the explanation with codes.

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 Reference the Initial Git Commit

This Git tutorial will provide you the best and appropriate explanation concerning the question of referencing the initial commit in a git repository.

How to Remove a Git Submodule

With the help of this tutorial, you will learn how to remove an unwanted Git submodule easily.

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.