ENTERPRISE CLOUD DEVELOPMENT CollabNet TeamForge Git Integration Dharmesh Sheta CollabNet Engineering Office Potsdam, Germany History Protection 1.How.

Slides:



Advertisements
Similar presentations
Polycom Quotes on Demand Tool Partner User Guide Version 1.1
Advertisements

Git Branching What is a branch?. Review: Distributed - Snapshots Files are stored by SHA-1 hash rather than filename Stored in git database in compressed.
1 of 7 This document is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT. © 2007 Microsoft Corporation.
Hosted Git github. From an alumni (2010)  You know, the more time I spent in industry the better I've understood what a strong advocate you are for the.
Maintaining Windows Server 2008 File Services
© Copyright 2013 TONE SOFTWARE CORPORATION. Confidential and Proprietary. All rights reserved. ® Basic Administrator Training – Release Adding Users.
Version Control with git. Version Control Version control is a system that records changes to a file or set of files over time so that you can recall.
1 CSE 390 “Lecture 11” Version control with Git slides created by Ruth Anderson, images from
Git for Version Control These slides are heavily based on slides created by Ruth Anderson for CSE 390a. Thanks, Ruth! images taken from
Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall.
Version Control with Subversion. What is Version Control Good For? Maintaining project/file history - so you don’t have to worry about it Managing collaboration.
Downloading and Installing PAF Insight PAF Insight can be easily downloaded Or can be installed from a CD A license is needed t0 activate the program.
FireRMS SQL Audit, Archiving & Purging Presented by Laura Small FireRMS Quality Assurance.
Microsoft Office Outlook 2013 Microsoft Office Outlook 2013 Courseware # 3252 Lesson 3: Working with People.
GIT An introduction to GIT Source Control. What is GIT (1 of 2) ▪ “Git is a free and open source distributed version control system designed to handle.
1Copyright ©2012 CollabNet, Inc. All Rights Reserved. ENTERPRISE CLOUD DEVELOPMENT CollabNet TeamForge What’s Gerrit How to use Gerrit Code Review Feature.
Quick Start Guide: Administrator Basics Learn about: 1.Adding users to the LOAMS system 2.How to modify or delete existing users 3.How to reset passwords.
Version control Using Git Version control, using Git1.
ITEC 370 Lecture 16 Implementation. Review Questions? Design document on F, feedback tomorrow Midterm on F Implementation –Management (MMM) –Team roles.
…using Git/Tortoise Git
Git workflow and basic commands By: Anuj Sharma. Why git? Git is a distributed revision control system with an emphasis on speed, data integrity, and.
Information Systems and Network Engineering Laboratory II DR. KEN COSH WEEK 1.
Object-Oriented Analysis & Design Subversion. Contents  Configuration management  The repository  Versioning  Tags  Branches  Subversion 2.
Microsoft Office Outlook 2013 Microsoft Office Outlook 2013 Courseware # 3252 Lesson 6: Organizing Information.
Team 708 – Hardwired Fusion Created by Nam Tran 2014.
CONFIDENTIAL H. Balogh, K. Toal RDN Release 27 Features April 9, 2014.
Diagnostic Pathfinder for Instructors. Diagnostic Pathfinder Local File vs. Database Normal operations Expert operations Admin operations.
PSeries Advanced Technical Support © 2002 IBM Corporation Presentation subtitle: 20pt Arial Regular, teal R045 | G182 | B179 Recommended maximum length:
LDAP Authentication Copyright © Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written permission.
By: Anuj Sharma. Topics covered:  GIT Introduction  GIT Benefits over different tools  GIT workflow  GIT server creation  How to use GIT for first.
Administrators on Springerlink Petra Schuster, Global Manager Customer Service eProducts.
GIT.
Intro to Git presented by Brian K. Vagnini Hosted by.
The world leader in serving science Overview of Thermo 21 CFR Part 11 tools Overview of software used by multiple business units within the Spectroscopy.
A user guide to accessing, reviewing and contributing to the Online Registry System.
Introduction to Git Yonglei Tao GVSU. Version Control Systems  Also known as Source Code Management systems  Increase your productivity by allowing.
SECTION 1: CODE REASONING + VERSION CONTROL slides borrowed and adapted from Alex Mariakis and CSE 390a Justin Bare & Deric Pang.
1Copyright ©2012 CollabNet, Inc. All Rights Reserved. ENTERPRISE CLOUD DEVELOPMENT CollabNet TeamForge What’s Gerrit How to use Gerrit Code Review Feature.
Hosted Git github. From an alumnus (2010)  You know, the more time I spent in industry the better I've understood what a strong advocate you are for.
Munis Version 9.1 & 8.3 Sneak Peek System Administration.
Information Systems and Network Engineering Laboratory I DR. KEN COSH WEEK 1.
Invoices and Service Invoices Training Presentation for Raytheon Supply Chain Platform (RSCP) April 2016.
QUIZ MODULE. You can Add the quiz title or heading Select the to and form date for the quiz Description of quiz Prize being offered – If you have any.
© CGI Group Inc. User Guide Subversion client TortoiseSVN.
Interstage BPM v11.2 1Copyright © 2010 FUJITSU LIMITED ADMINISTRATION.
Git workflows: using multiple branches for parallel development SE-2800 Dr. Mark L. Hornick 1.
GIT Version control. Version Control Sharing code via a centralized DB Also provides for Backtracking (going back to a previous version of code), Branching.
GIT: (a)Gentle InTroduction Bruno Bossola. Agenda About version control Concepts Working locally Remote operations Enterprise adoption Q&A.
Information Systems and Network Engineering Laboratory II
Git and GitHub primer.
11 Version control (part 2)
Git Practice walkthrough.
Source Control Dr. Scott Schaefer.
Lesson 3: Customizing Document Elements
Software Engineering for Data Scientists
Macaualy2 Workshop Berkeley 2017
Distributed Version Control with git
Source Code Management
Getting Started with Git and Bitbucket
User Guide Subversion client TortoiseSVN
Git CS Fall 2018.
Version Control System - Git
Version control with Git
Introduction to Version Control with Git
This presentation document has been prepared by Vault Intelligence Limited (“Vault") and is intended for off line demonstration, presentation and educational.
Concurrent Versions System
Patrick Cozzi University of Pennsylvania CIS Fall 2012
GitHub 101 Using Github and Git for Source Control
Git Fundamentals.
Presentation transcript:

ENTERPRISE CLOUD DEVELOPMENT CollabNet TeamForge Git Integration Dharmesh Sheta CollabNet Engineering Office Potsdam, Germany History Protection 1.How one can rewrite history in Git 2.Why one would rewrite history 3.How TeamForge Git Integration can protect against history re-write 4.How to enable history protection in Teamforge Git 5.How to use History Protection reporting and restore history

2Copyright ©2012 CollabNet, Inc. All Rights Reserved. 1. How one can rewrite history in Git

Code Base History Re-Write Blessed Git Repo Local Git Repo git clone Developer Developer Commit #1 Initially files added File A added Commit #2 More files added Commit #3 Files modified Commit #4 Files Deleted Commit #1 Initially files added File A added Commit #5 More files added File X added git push –f origin master Commit #1 Initially files added File A added Commit #2 More files added File B Added Commit #3 Files modified File A modified Commit #4 Files Deleted File A Delete Change log Change log after History Re-Write Commit #1 Initially files added File A added Commit #5 More files added File X added Commit #1 Initially files added File A added Commit #2 More files added File B Added Commit #3 Files modified File A modified Commit #4 Files Deleted File A Delete Local git commit(s) No traces about deleted changes (commits & metadata associated, files, directories) Periodic ‘Garbage Collector’ will remove references soon and thereon no references will be available on ‘blessed repository’ Removes some files either by purpose or accidentally

“We define History Rewrite as non-fast forward updates of remote refs and its associated objects. This happens whenever a branch in the remote repository gets deleted, previously pushed commits get amended/tree filtered and forcefully re-pushed, or a remote branch/tag is pointed to an entire different commit history.” Formal definition of History Rewrite

5Copyright ©2012 CollabNet, Inc. All Rights Reserved. 2. Why one would rewrite history

Legitimate use cases – Developers Deleting accidently committed file(s)/ change(s) Change appearance of commits – squashing multiple commits into unified single commit – change order of commits - Build / Release managers / Developers Removing Copyrights/ Intellectual Property(IP) related resources from code base Removing large file(s) Removing feature branch(es) created temporarily and already merged Not (so) Legitimate use cases – Developers / Build /Release Managers Remove somebody else’s changes without leaving any trace Pretending someone else’s change as own (forgery) Accidentally removing branches Use cases for rewriting history

Prevents By enforcing Role Based Access Control for Git repositories Project admin can decide upon who can push to ‘blessed repository’ and who is allowed to use ‘push -f’ in first place Manages Project admin can turn on ‘History Protection’ per Git repository basis – or - all Git repositories hosted by TeamForge Reports Every ‘History re-write’ event is reported by to site-admin Every incident will be stored and available in Gerrit WebUI – With info about when, what, who has re-written history Resurrects Provides a possibility to restore history as it was before conveniently from Gerrit WebUI or using Git client TeamForge Git Integration ‘History Protection’

8Copyright ©2012 CollabNet, Inc. All Rights Reserved. 3. How TeamForge Git Integration can protect against history re-write

How does it work Signals event into TeamForge Git Sends an to Gerrit Administrators Copies history (a snapshot) under refs/rewrite -or- refs/deleted on blessed repository Reports into Gerrit WebUI for audit and restoration purpose

10Copyright ©2012 CollabNet, Inc. All Rights Reserved. 4. How to enable history protection in TeamForge Git

Option allows to protect all Git repository hosted by TeamForge site TeamForge site -admin with file system access to machine where TeamForg Git Integration server is hosted, in file /opt/collabnet/gerrit/etc/gerrit.config can set forceHistoryProtection = true Enable ‘History Protection’ Site Wide

Alternatively this option allows you to protect history of particular Git repository hosted by TeamForge in specific TeamForge Project Enable ‘History Protection’ per Git repository 1 2 Go to TeamForge project ->source code Make sure that your description field contains exact string “[Repo:ProtectHistory]”, and then press ‘save’ Once this option is set, history protection is enabled. However at any of point, switch off by removing “[Repo:ProtectHistory]” from description if needed

13Copyright ©2012 CollabNet, Inc. All Rights Reserved. 5. How to use History Protection reporting and restore history

History Protection Report Whenever history gets ‘re-written’, an gets sent out to ‘Gerrit Administrators’ containing details about old HEAD of branch and new HEAD after ‘re-write’

History Protection Report History ‘re-write’ event is also logged in /opt/collabnet/gerrit/logs/gerrit.audit.log Following events related to ‘History re-writes’ get logged in and can be used for audit purpose History re-write Backup branch deletion Resurrection from backup branch

History Protection Report Login as ‘Gerrit Administrator’ in TeamForge Click ‘Admin’ tab Click on ‘Projects’ Select and click on project (Git Repo in TeamForge) 6 Select ‘Rewritten history’ Either REWRITE or DELETE User who re-wrote history SHA-1 referring Change just before history rewrite Time when history got re-written SHA-1 referring Change just after history rewrite Further actions (Follow next slide for details) Whenever history gets ‘re-written’, this event will logged in Gerrit Web UI and can be used for audit and restoration (resurrection)

History Protection Report Delete permanently will remove entry completely Resurrect will allow you to restore history as it was just before ‘history re-write’ into a separate branch Alternatively users can also use their standard Git client o find about about rewritten/deleted branches by running git fetch && git ls-remote

Restore (resurrect) History Using Gerrit WebUI 1 Chosen Resurrect, then box will pop-up as shown 5 Give a name for branch in which history will be resurrected and press ‘OK’ button 6 Click on ‘Branches’ to resurrect branch Click on ‘Branches’ to resurrect branch 7 Resurrected branch is now available for all user having atleast read access(view only) for this Git repository in TeamForge TeamForge Git Integration allows you to restore history as it was just before ‘re-write’, into a separate branch right from Gerrit WebUI Resurrected branch visible to all users who have atleast ‘view-only’ access to Git repository in TeamForge Following command on git client side will show restored branch 4 Login as Gerrit Administrator 3 Goto Gerrit and select Git repository 2 Click on ‘Re-written history’ Click on ‘Re-written history’

Restore (resurrect) History Using Git Command Line Alternatively users having permissions to create a new branch can restore history by using their git client 1 Run this command on git command line 2 Copy HEAD SHA1 of branch created after history ’re-write’ 3 Use copied SHA1 to create new local branch in Git Push this local branch to remote ‘blessed reposiotry’ Resurrected branch via command line is now available for all user having atleast read access(view only) for this Git repository Fetch SHA1 of rewritten history from server 4 5

More details on both options can be found on hcn and our README