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://sshusername@hostname: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: |

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

Views in Perforce

There are three types of views: client views, branch views, and label views. Client views map files in the depot to files in the client workspace Branch views map files in the depot to other parts of the depot Label views associate groups of files in the depot with a [...]

2017-01-19T20:05:34+05:30Categories: Version Control|

Common Commands | Git

The git init command creates a new Git repository. It can be used to convert an existing, unversioned project to a Git repository or initialize a new empty repository. git add git add '.c'  // Add all files with '.c' extension. git add -all // Add all files to stagged [...]

2019-11-11T16:19:24+05:30Categories: Version Control|Tags: |

Git basics

  File states Git has three main states that your files can reside in: committed, modified, and 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 [...]

2017-01-20T01:59:29+05:30Categories: Version Control|Tags: |

Create New Repository in Git

Introduction The purpose of Git is to manage a project, or a set of files, as they change over time. Git stores this information in a data structure called a repository. The .git folder in a git repository is used by GIT programs to store information about the repository. Below [...]

2021-03-12T00:49:37+05:30Categories: Version Control|Tags: |
Go to Top