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|

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

Undo all uncommitted changes in Git

Unstage all files you might have staged with git add: git reset Revert all local uncommitted changes (should be executed in repository root): git checkout . Revert all uncommitted changes git reset --hard HEAD Remove all local un tracked files, so only git tracked files remain git clean -fdx Undo [...]

2017-03-07T12:49:05+05:30Categories: Version Control|Tags: |

Sync local repo with remote one in Git

Local code repository can be synchronized with remote by following different ways :- git fetch --prune -p, --prune After fetching, remove any remote-tracking branches which no longer exist on the remote. git fetch origin git reset --hard origin/master git clean -f -d This makes your local repository exactly like your [...]

2017-01-31T14:17:55+05:30Categories: Version Control|Tags: |
Go to Top