INFO 2480-61: Website Database Implementation
  • Syllabus
  • Welcome Letter
  • Week 1: Software and Setup
    • Folder Structure
    • Git: Getting Started
      • Installing a Git Client
      • Creating a Local Repository
      • Making Changes and Merging them
      • Git Wrap Up
    • Git: Github
      • Creating a New Account
      • Creating a Repo on Github
      • Cloning and Forking
      • Cloning a Repo from Github
      • Pushing Changes to Github.com
      • Github: Adding a Collaborator
    • Command Box
      • Downloading the Software
      • Unzipping and Running the Software for the first time
      • Using CommandBox And Installing the UML-Info package.
      • Setting Up Your Local Server
      • Last Step
    • IDE ( Integrated Development Environment )
      • VS Code
      • IntelliJ
    • Journal
  • Week 2: Review of HTML and CSS
    • Making Point In Time and Working Branches
    • Opening our Project from Week 1 and Starting our BoxLang server
    • HTTP Calls and Requests
    • Making a Static Website Dynamic
    • Creating The Management Index.bxm
    • Creating An HTML Form with Bootstrap
    • Last Steps
  • Week 3: Working Forms and our First Table
    • Data Types
    • Case Types and Naming Conventions
    • Database Tools and Your First DB
      • Installing MySql WorkBench
      • Connecting to your MySQL database
      • Creating Your First Table
    • Working Forms
      • Separation of Concerns
      • Configuring Our Site To Use Our Database
      • Capturing Your Form Data
      • Creating Our Server Side Logic
  • Week 5: SQL and Modelling
    • Our Project And Its Users
    • Introduction to SQL
    • Completing our Articles page.
      • Adapting manageArticles.bxm to display existing articles in the database
      • Completing ManageArticles.bxm to Edit Existing Articles.
      • Making Active Articles Appear On The Public Page
  • Week 6: Managing Books
    • Introduction To Modelling
    • Our Data Models
    • Adapting Our Management Page To Be Multi-Tool
    • Creating The Manage Books Page
    • Adding Search To Our Front Index Page
  • Week 7: Working with Selects, Files, WYSIWYG and more.
    • Adding WYSIWYG Capabilities
    • Adding WYSIWYG to the Manage Books Tool
    • Adding Images To Our Store
    • Creating Our Publisher Select Control
  • Week 9: Joins and Better Searching
    • Displaying Our Publisher
    • Searching By Publisher
    • Creating a Browse by Genre
      • Adapting Our Database
      • Building our Queries: Part 1
      • Assigning Genres to a Book in our AddEdit.bxm page
      • Building our Queries: Part 2
      • Building the GenreNav.bxm
      • Adapting The Details.bxm Page to Search By Genre
  • End of Project Checkllist
Powered by GitBook
On this page
  1. Week 1: Software and Setup
  2. Git: Getting Started

Making Changes and Merging them

Goal: By the end of this document you will have branched off of the master branch, edited the MyFirstText.txt file and then merged it back into the master branch.

PreviousCreating a Local RepositoryNextGit Wrap Up

Last updated 4 months ago

Let's make some edits. Remember, we don't want to edit our Master version. We want to make our edits in a copy and then, when we are happy with them, merge them into our main branch.

  1. In SourceTree, double click on the "master" branch in the left side menu under Branches to ensure it is checked out (it will appear in bold if it is) .

  2. At the top of the screen, click on BRANCH and name your branch "First-Edit" in the window that pops up.

  3. Click on Create Branch.

  4. You will see First-Edit appear in the side menu under branches and will be in bold to indicate that it is the one checked out.

  5. Open MyFirstText.txt in a text editor. If you still have it open from before, you do not need to close and re-open it.

  6. Make some changes to it. These can be anything but here is an example:

  7. Save it and go back to SourceTree. Click on File Status again and you will see your file in the Unstaged Files area

  8. Click on it and in the upper right, will see something like this: This shows the changes which have been made in the file. The lines highlighted in red have been deleted or changed. The green lines have been added. Does this line up with the changes you made?

  9. Stage the changes by clicking on Stage Selected like you did before.

  10. Enter a comment in the box on the bottom and click on Commit. You've now put the changes into the First-Edit branch in your repo.

  11. Close the file in your text editor.

  12. Back in SourceTree, if you want to see your original file, double click on "master" and then open MyFirstText.txt in your text editor. See the original? Close that. Double click on FIrst-Edit and open the file again. See the changes?

Merging Your Changes Into the Master Branch

  1. Check out the master branch by double clicking on "master" in the left hand menu. Make sure it is in bold to indicate it is checked out.

  2. Right click on First-Edit and choose "Merge First Edit into current branch".

  3. Confirm the merge by clicking ok.

  4. Open MyFirstText.txt in your text editor. It should have all of your changes in it.

Watch Video