GIT

git checkout vs git cherry-pick

This article discuss about git checkout vs git cherry-pick command, and when to use these commands. git checkout command switches between branches or restores working tree files. This command operates upon three distinct entities i.e. files, commits, and branches. Checking out branches is similar to checking out old commits. Files in [...]

2022-11-15T18:01:54+05:30Categories: Version Control|Tags: |

Show file revision history using Git

git blame show what revision and author last modified each line of a file. Syntax Below is the syntax of this command. git blame [-c] [-b] [-l] [--root] [-t] [-f] [-n] [-s] [-e] [-p] [-w] [--incremental] [-L <range>] [-S <revs-file>] [-M] [-C] [-C] [-C] [--since=<date>] [--ignore-rev <rev>] [--ignore-revs-file <file>] [--color-lines] [...]

2022-02-25T18:31:38+05:30Categories: Version Control|Tags: |

What is HEAD in GIT ?

HEAD in GIT is a special pointer. It is a pointer to the last commit snapshot. In simple words, it always points to the most recent commit in the current checkout branch. When you checkout to other branch, it is known as the active or current branch. HEAD^ and HEAD~ [...]

2022-02-09T20:26:52+05:30Categories: Version Control|Tags: |

How to find tag using git describe command

Git has a feature called Tags, it provide an excellent, direct, and simple way to mark the code when a specific version gets released during the development life cycle. For more details refer this. git describe command finds the most recent tag that is reachable from a commit. Get Most [...]

2021-07-06T19:47:10+05:30Categories: Version Control|Tags: |

How to use ‘git checkout’ command

Introduction The git checkout command switches between branches or restores working tree files. This command operates upon three distinct entities: files, commits, and branches. Checking out branches is similar to checking out old commits and files in that the working directory is updated to match the selected branch/revision. However, new [...]

2022-11-15T17:27:03+05:30Categories: Version Control|Tags: |

How to Add Files to Gitignore ?

Introduction To ignore a class of files that you don’t want Git to automatically add or even show you as being untracked, create a named .gitignore and  add entries of those files as shown in following example. $ cat .gitignore *.[oa] *~ First line show the content of file. Second [...]

2021-04-03T21:13:53+05:30Categories: Version Control|Tags: |

status Command | Git

Git status command is used to know the status of the working tree. It shows the state of your working directory and helps you see all the files which are untracked by Git, staged or unstaged. In other words, Git will show you any difference in the current tree and [...]

2019-11-11T17:25:25+05:30Categories: Version Control|Tags: |

add Command | Git

The add command marks changes to be included in the next commit. It adds changes to "Staging Area", the contents of which can then be wrapped up in a new revision with the git commit command. However, git add doesn't really affect the repository in any significant way—changes are not actually recorded [...]

2019-11-11T22:16:41+05:30Categories: Version Control|Tags: |

File revision states | Git

Git has three main states that files can reside in i.e. Committed Modified Staged Committed means that the data is safely stored in your local database. Modified means that you have changed the file but have not committed it to your database yet. Staged means that you have marked a [...]

2019-11-11T16:30:39+05:30Categories: Version Control|Tags: |
Go to Top