Version Control

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: |

checkout Command | Git

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 branch Use git checkout command to navigate between the branches created by git branch. Checking out a branch updates the files in the [...]

2019-11-16T14:25:29+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: |

Perforce command line

Perforce configuration details like current user, current workspace and other details p4 info Current working workspace and logged in user p4 set P4CLIENT Change the workspace // Change the workspace to 'client1' p4 set P4CLIENT=client1 Login to P4 on terminal p4 login Get latest revision of the files p4 sync [...]

2019-09-02T21:17:41+05:30Categories: Version Control|

Resolving files in Perforce

Resolve option in Perforce: Accept Source: Replaces the copy of the file in your workspace with the version that is in the depot, discarding your changes. Accept Target: Accepts the file that is in your workspace, overwriting the version that is in the depot when you submit the file. Accept [...]

2017-03-13T19:50:00+05:30Categories: Version Control|

Uploading changes in Gerrit Code Review

This post discus about various aspects of uploading code changes (review) in Gerrit. Create Changes To create new changes for review, push to the project’s magical refs/for/'branch' ref using any Git client tool: git push ssh://[email protected]:29418/projectname HEAD:refs/for/branch Each new commit uploaded by the git push client will be converted into [...]

2022-01-14T13:08:24+05:30Categories: Version Control|Tags: |
Go to Top