Kannan sudhakaran has Published 20 Articles

Explain BLOB object and tree object in Git.

kannan sudhakaran

kannan sudhakaran

Updated on 20-Feb-2021 09:04:17

1K+ Views

Git uses a series of BLOBs and trees to store content of the working directory of a project. Whenever we perform a commit operation, Git internally creates a series of trees and BLOBs, which is the binary representation of the project folder structure at that point in time of commit.What ... Read More

What is the short status in Git?

kannan sudhakaran

kannan sudhakaran

Updated on 20-Feb-2021 09:01:52

2K+ Views

The git status command returns the current state of the −Working areaStaging areaThis command returns tracked and untracked files and changes made to the repository. However, this command does not show any commit records or information. This command usually returns a status message denoting one of the following states −No ... Read More

How do we stash changes in Git?

kannan sudhakaran

kannan sudhakaran

Updated on 20-Feb-2021 08:59:46

645 Views

This question can be rephrased as "How to save work in progress (WIP) in Git and return to it later when convenient?"The problem − When we switch branches, Git resets our working directory to contain the snapshot stored in the last commit of the target branch. For example, if we ... Read More

How to compare two branches in Git?

kannan sudhakaran

kannan sudhakaran

Updated on 20-Feb-2021 08:57:04

2K+ Views

Collaborators will use multiple branches in order to have clearly separated codebase. At some point in time, we may have to merge these branches in order to have the resulting work in the main branch. It is important that we compare the differences in the branches before merging to avoid ... Read More

Why is git branching fast compared to other version control systems?

kannan sudhakaran

kannan sudhakaran

Updated on 20-Feb-2021 08:55:03

277 Views

Branching allows us to diverge from the main line of work and work on something else in isolation. Conceptually, we can think of a branch as a separate isolated workspace. We have a main workspace called the master.We can create a feature branch and work separately on the feature branch ... Read More

How to tag a commit in git?

kannan sudhakaran

kannan sudhakaran

Updated on 20-Feb-2021 08:53:33

3K+ Views

The git commit is a 40-digit hexadecimal SHA1 hash. Quite often we need to bookmark a as the commit hash is difficult to memorize. This is where one can use tags. Tags can be used to name a commit. In other words, tags are labels that can be used to ... Read More

What is the meaning of the ‘detached HEAD’ state in git?

kannan sudhakaran

kannan sudhakaran

Updated on 20-Feb-2021 08:52:17

1K+ Views

Explanation − In git HEAD is a reference pointer and points to the current commit in the current branch. The below diagram shows that there are two commits ‘Commit#1’ and ‘Commit#2’, where ‘Commit#2’ is the latest commit. Every commit in Git will have a reference to its previous commit. Here, ... Read More

What is the difference between HEAD and master in git?

kannan sudhakaran

kannan sudhakaran

Updated on 20-Feb-2021 08:50:31

5K+ Views

A branch in Git is a series of interrelated commits. When a repository is initialized in Git, a branch will be created by default. This default branch is called the master.Multiple branches can be created within a Git repository. When a developer starts working on a new feature of the ... Read More

How do you view the revision history in Git?

kannan sudhakaran

kannan sudhakaran

Updated on 20-Feb-2021 08:48:40

959 Views

Let’s say you want to view all commits to the Git repository. The git log command returns all of the commits that have been made to the repository. This command lists the latest commits in chronological order, with the latest commit first.The syntax of the git log command is given ... Read More

Difference between a Centralised Version Control System (CVCS) and a Distributed Version Control System (DVCS)

kannan sudhakaran

kannan sudhakaran

Updated on 20-Feb-2021 08:46:19

971 Views

A version control system is a software that allows you to manage changes to assets (codebase, files) over a period of time. Centralised and Distributed are the two main types of version control systems. The fundamental difference between these two lies in how they −Manage the repositoriesManage the content workflowCentralised ... Read More

Advertisements