Getting Started with Git and Bitbucket

Slides:



Advertisements
Similar presentations
An Introduction to Using
Advertisements

Google Apps: Google Mail Got Gmail?....Need Help? Mrs. Connor.
Online Collaboration Applications ADE100- Computer Literacy Lecture 28.
Microsoft Office 2007: Introductory Computer Applications 11.
XP Browser and Basics1. XP Browser and Basics2 Learn about Web browser software and Web pages The Web is a collection of files that reside.
Building Web Pages With Microsoft Office. Introduction This tutorial is for the beginning web builder. It utilizes software that you already have, Microsoft.
Version Control Systems Phil Pratt-Szeliga Fall 2010.
1 of 6 Parts of Your Notebook Below is a graphic overview of the different parts of a OneNote 2007 notebook. Microsoft ® OneNote ® 2007 notebooks are digital.
1 of 6 This document is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT. © 2007 Microsoft Corporation.
1 of 7 This document is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT. © 2007 Microsoft Corporation.
Browser and Basics Tutorial 1. Learn about Web browser software and Web pages The Web is a collection of files that reside on computers, called.
Working with SharePoint Document Libraries. What are document libraries? Document libraries are collections of files that you can share with team members.
By Steven Campbell and Erik Boone.  Sharing projects by putting them into a central repository.  Checking out copies of projects from the repository.
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.
The basics of the Online Portal
BIT 285: ( Web) Application Programming Lecture 07 : Tuesday, January 27, 2015 Git.
Git for Version Control These slides are heavily based on slides created by Ruth Anderson for CSE 390a. Thanks, Ruth! images taken from
Website Designing Using Ms FrontPage FrontPage 2003 Create a Web site with FrontPage.
علیرضا فراهانی استاد درس: جعفری نژاد مهر Version Control ▪Version control is a system that records changes to a file or set of files over time so.
XP New Perspectives on Browser and Basics Tutorial 1 1 Browser and Basics Tutorial 1.
A primer on version control at OTN
With Mercurial and Progress.   Introduction  What is version control ?  Why use version control ?  Centralised vs. Distributed  Why Mercurial ?
Git – versioning and managing your software L. Grewe.
Tutorial 1: Browser Basics.
Version control Using Git Version control, using Git1.
Source Control Primer Patrick Cozzi University of Pennsylvania CIS Spring 2012.
Drexel University Software Engineering Research Group Git for SE101 1.
…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.
Team 708 – Hardwired Fusion Created by Nam Tran 2014.
Publishing Your Web Pages Ann Emmanuel SIUE Web Administrator
My Workspace ELearning in Sakai Randy Graff, PhD HSC Training.
Tour Overview Introduction Collage Basics Collage Basics (Templates and Tools) Computer Configuration Bookmark Collage Getting Started Tour Collage Terminology.
1 GIT NOUN \’GIT\ A DISTRIBUTED REVISION CONTROL AND SOURCE CODE MANAGEMENT (SCM) SYSTEM WITH AN EMPHASIS ON SPEED. INITIALLY DESIGNED AND DEVELOPED BY.
Version Control Systems. Version Control Manage changes to software code – Preserve history – Facilitate multiple users / versions.
GIT.
Intro to Git presented by Brian K. Vagnini Hosted by.
L.T.E :: Learning Through Experimenting Using google-svn for MtM Docs Development Denis Thibault Version 3.2 Mar 12 th, 2009.
FTP COMMANDS OBJECTIVES. General overview. Introduction to FTP server. Types of FTP users. FTP commands examples. FTP commands in action (example of use).
© 2015 by Herb Holyst Introduction to git Cytomics Workshop December, 2015.
CS 160 and CMPE/SE 131 Software Engineering February 16 Class Meeting Department of Computer Science Department of Computer Engineering San José State.
Information Systems and Network Engineering Laboratory I DR. KEN COSH WEEK 1.
Using Git with collaboration, code review, and code management for open source and private projects. & Using Terminal to create, and push commits to repositories.
Installing git In Linux: sudo apt-get install git In Windows: download it from run the setuphttp://git-scm.com/download/win.
BIT 285: ( Web) Application Programming Lecture 07 : Tuesday, January 27, 2015 Git.
GIT Version control. Version Control Sharing code via a centralized DB Also provides for Backtracking (going back to a previous version of code), Branching.
General System Navigation
Information Systems and Network Engineering Laboratory II
CReSIS Git Tutorial.
NetApp Online Ordering User Tutorial
Version Control overview
Version control, using Git
Services Course 9/9/2018 3:37 PM Services Course Windows Live SkyDrive Participant Guide © 2008 Microsoft Corporation. All rights reserved.
Storing, Sending, and Tracking Files Recitation 2
Updating Your Section’s Website
Bomgar Remote support software
Collaboration with Google Docs
An Introduction to Using
Part 1: Editing and Publishing Files
User Guide Subversion client TortoiseSVN
Git CS Fall 2018.
Git started with git: 2018 edition
Git Introduction.
1. GitHub.
Introduction to The Git Version Control System
Become a Google Calendar Pro.
Using GitHub for Papyrus Models Jessie Jewitt – OAM Technology Consulting/ ARM Inc. January 29th, 2018.
Presentation transcript:

Getting Started with Git and Bitbucket

Overview This presentation covers every basic command you need to do the vast majority of the things you’ll eventually spend your time doing with Git. You should be able: to configure and initialize a repository, begin and stop tracking files, and stage and commit changes. to ignore certain files and file patterns, to undo mistakes quickly and easily, to browse the history of your project and view changes between commits, and to push and pull from remote repositories.

Distributed Version Control Systems (Full Repository on all machines)

Git Project Structure (Local Machine)

Account/Tool Requirements You must have A Bitbucket Account, and Git installed on your PC/Laptop.

What is Bitbucket? Bitbucket is a web-based hosting service (i.e. a server) for projects that use either the Mercurial or Git revision control systems. It allows software engineers to share repositories and collaborate on projects. Bitbucket offers both commercial plans and free accounts. It offers free accounts with an unlimited number of private repositories (which can have up to five users in the case of free accounts).

Create Bitbucket Account You must to create your own Bitbucket account. (https://bitbucket.org/) Use your AIT Student email to create account. Refer to “Create a Bitbucket Account” instructions on moodle or follow the link -https://confluence.atlassian.com/bitbucket/create-a-bitbucket-account-728138044.html

Setup Version Control (Git) When you use Bitbucket, you want to transfer your files/code between your local system and Bitbucket. This is where a distributed version control system (DVCS), such as Git, comes in! Bitbucket supports two DVCS tools: Git and Mercurial. You can use both of these tools by typing commands from a terminal or SourceTree. SourceTree is an application with a user interface that lets you do everything you can do with Git and Mercurial without learning a lot of new commands.

Setup Version Control (Git) Refer to “Setup SourceTree” instructions on moodle or follow the link https://confluence.atlassian.com/bitbucket/set-up-sourcetree-603488472.html You should setup SourceTree on your own PC or laptop. It should already be setup in the AIT labs.

Getting Started with Repositories Using Bitbucket and Sourcetree

Introduction This section focuses on the basic DVCS workflow activities between Bitbucket and your local system. These activities or functions are clone, add, commit, push, and pull.

Tutorial Refer to SourceTree tutorial for details of the following slides: https://confluence.atlassian.com/bitbucket/create-a-git-or-mercurial-repository-760120240.html

Step 1. Create a repository Initially, the repository you create in Bitbucket is going to be empty without any files/code in it. (Remember to login to your account) That's okay because you will start adding some files to it soon. This Bitbucket repository will be the central repository for your files, which means that others can access that repository if you give them permission.

Step 1. Create a repository You will also copy a version of that repository to your local system (later!).

Step 2. Explore your new repository

Copy your repository and add files

Clone (or Copy) A Repository Now that you have a place on a server to add and share files, you need a way to get to it from your local system. To set that up, you want to copy the Bitbucket repository to your system. SourceTree refers to copying a repository as "cloning" it. When you clone a repository, you create a connection between the Bitbucket server and your local system.

Step 3. Clone your repository to your local system Click “Clone in SourceTree” button. From the Clone New dialog box, update the Destination Path to <local directory>/repos/bitbucketstationsupplies. This destination path refers to the directory you just created with the folder for the repository. The Name field remains the same with the folder name of the repository.

Step 4. Create a file, add it locally, and push it to Bitbucket Go to your local directory/folder for your local repository “bitbucketstationsupplies”. Create a word document (supplies.doc) with some text in it. For example: “space ice cream nerf darts telescope light shield”

Step 4. Create a file, add it locally, and push it to Bitbucket File is now unstaged.

Step 4. Create a file, add it locally, and push it to Bitbucket Click the Add button at the top to stage the file, making it ready to commit. Adding a file moves changes from the working directory to the staging area. The staging area gives you the opportunity to prepare a snapshot of a set of changes before committing them to the official history.

Step 4. Create a file, add it locally, and push it to Bitbucket File is now staged.

Step 4. Create a file, add it locally, and push it to Bitbucket Click the Commit button at the top to commit the file. In the message box, enter "Initial commit.“ Click the Commit button under the box. Your new file is now committed to the project history.

Step 4. Create a file, add it locally, and push it to Bitbucket

Step 4. Create a file, add it locally, and push it to Bitbucket Up until this point, everything you have done is on your local system and is invisible to your Bitbucket repository until you push those changes to your remote Bitbucket repository. From SourceTree, click the Push button to push your committed changes. Pushing lets you move one or more commits to another repository, which serves as a convenient way to publish contributions.

Step 4. Create a file, add it locally, and push it to Bitbucket Under the Push? column, select the master branch to indicate that you are pushing that branch to origin and click OK.

Step 4. Create a file, add it locally, and push it to Bitbucket Go to the BitbucketStationSupplies repository in your browser and click the Commits item on the menu bar. You should see a single commit on your repository. Bitbucket combines all the things you just did into that commit and shows it to you.

Pull changes from your repository on Bitbucket

Step 5. Create a file in Bitbucket From the Source page, click New file. You are able to see this button because you have already added at least one file to the repository. A page for creating the new file opens, as shown in the following image.

Step 5. Create a file in Bitbucket

Step 5. Create a file in Bitbucket Enter supplyrequest in the filename field. Select HTML from the Syntax mode list. Add the following HTML code to the text area: <p>We are requesting additional supplies. Please send us the following:</p><ul> <li>space ice cream</li> <li>nerf darts</li> <li>telescope light shield</li></ul>

Step 5. Create a file in Bitbucket Click Commit. The Commit message field appears with the message: supplyrequest created online with Bitbucket. Click Commit under the message field. You now have a new file in Bitbucket! You are taken to a page with details of the commit, where you can see the change you just made:

Step 5. Create a file in Bitbucket

Step 5. Create a file in Bitbucket If you want to see a list of the commits you've made so far, click Commits link on the left side.

Step 6. Pull changes from a remote repository Now we need to get the new file onto your local system. The process is pretty straight forward, basically just the reverse of the push you used to get the supplies.doc file into Bitbucket.

Step 6. Pull changes from a remote repository Open SourceTree. Click the Pull button. A popup appears to indicate that you are merging the file from Bitbucket to your local repository. See next slide.

Step 6. Pull changes from a remote repository

Step 6. Pull changes from a remote repository Click OK from this box. Sourcetree updates with a description of the merged file. Navigate to the location of your repository directory on your local system and find the file you just added.

Summary

Some facts about Repositories You have access to all files in a repository, whether you are working on one file or multiple files. Each repository belongs to a user account or a team. The person who creates the repository is its owner. The repository owner is the only person who can delete the repository. A user or a team can have an unlimited number of public and private repositories. A code project can consist of multiple repositories across multiple accounts but can also be a single repository from a single account.