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
  • Creating a Git Repository
  • Creating, Staging and Committing Files
  1. Week 1: Software and Setup
  2. Git: Getting Started

Creating a Local Repository

Goal: By the end of this document, you will have created a git repository, created a new file, staged the file and committed it to your local repo.

PreviousInstalling a Git ClientNextMaking Changes and Merging them

Last updated 4 months ago

Once you have installed SourceTree (or other client) you are ready to experiment with git. The first step is to create a git repo. We are going to use SourceTree to perform all of these actions for now.

Creating a Git Repository

  1. Open SourceTree and click the + symbol in top menu bar or choose FILE -> Clone/New in the tool bar.

  2. Click on CREATE in the tool bar that appears

  3. If you followed the pattern outlines in the section, navigate to Sites\UML\WebDataImplementation\and make a new folder called "practiceGit" If you didn't, simply choose a empty folder.

  4. Click Create.

  5. Use either Windows Explorer or Finder to go to the practiceGit folder. Make sure you have it configured to see hidden files and folders ( Google how if you need to). You should see a folder called ".git" folder. This is where git will save all the information it needs to manage all the branches for the repository ( or repo ) in this folder. Note: DO NOT SAVE ANY FILES IN THAT FOLDER. Also, do not edit any of the files in that folder. Bad things to your work can happen. Let git handle it all.

Creating, Staging and Committing Files

  1. Open a text editor (like Notepad or TextEdit. Do Not use Microsoft Word or Pages. In TextEdit, make sure you choose FORMAT -> make Text File if necessary) and create a new file called "MyFirstText.txt" in your git1 folder.

  2. Type "This is my first file with git. So far so good." and then save into that practiceGit folder. This saves the file onto your hard drive but it is NOT in your git repository yet.

  3. Go back to SourceTree and click on the "practiceGit" tab. If you closed that tab, click on the + sign again and use ADD to open that repo again.

  4. In the left hand menu pane, under WORKSPACE, click on FILE STATUS.

  5. In the lower half of the center column you should see a section called "UNSTAGED FILES" and in it your MyFirstText.txt file should be listed. Click on it.

  6. You should see the contents of your file appear in the upper right.

  7. Back in the center column, click on "STAGE SELECTED" (On Mac: right click and choose Stage Files ). This will move MyFirstText.txt from the unstaged area to the STAGED FILES area. This area is a list of all the files which are going to be put into your repo but are not there yet.

  8. At the bottom of the screen you will see a text box with the button COMMIT underneath it. In the text area, type "INITIAL COMMIT". It is customary to put a comment describing the work you did for each commit.

  9. Click Commit. This will put your file into the git repository in that folder. It is now in the version control system and managed by git.

  10. Look in the left menu panel under BRANCHES and notice that one called "master" has been created. It is in bold which means that is the branch which is currently checked out so all the files, no matter what program in which you open then, will be editing the files in this branch.

View Video
Folder Structure