💾
EC
  • Introduction
  • EC Course
    • Syllabus
    • Preparation for EC
    • Tutorial
      • Tutorial: arduino-stm32
        • Tutorial: arduino-stm32 Installation
        • Tutorial: arduino-stm32 Part1
        • Tutorial: arduino-stm32 Part2
      • Tutorial: MDK uVision
        • Tutorial: Installing MDK uVision
        • Tutorial: Create a Project with uVision
        • Tutorial: Adding library header in uVision
        • Tutorial: Re-using Project Configuration
        • Debugging in uVision
      • Tutorial: PlatformIO in CLion
      • Tutorial: PlatformIO in VSCode
      • Tutorial: Repository Management
      • Tutorial: Managing library header files
      • Tutorial: PinName Configuration
      • Tutorial: Bitwise Macro
      • Tutorial: Custom initialization
      • Tutorial: Documentation
      • Tutorial: Creating Application API
      • Tutorial: 7-Segment Display
      • Tutorial: DC motor driver connection
      • Tutorial: USART with TeraTerm
      • Tutorial: Finite State Machine programming
      • Tutorial: Bluetooth
      • Tutorial: Zigbee with Nucleo board
    • LAB
      • LAB Report Template
      • LAB: Smart mini-fan with STM32-duino
      • LAB: Portable Fan with mbed
      • LAB: GPIO Digital InOut
      • LAB: GPIO Digital InOut 7-segment
      • LAB: EXTI & SysTick
      • LAB: Timer & PWM
      • LAB: Stepper Motor
      • LAB: Input Capture - Ultrasonic
      • LAB: USART - LED, Bluetooth
      • LAB: ADC - IR reflective sensor
      • LAB: Line Tracing RC Car
    • Sample code
      • Code Templates
    • Hardware
      • Nucleo-F411RE
      • LAB Hardware
        • Electronic Chips
        • HUINS Embedded Kit
    • Projects
      • Line Tracing Car Project
      • Design Project
        • Past Projects
      • Project Grading Criteria
    • Study Resource for MCU
      • Hexa-Decimal Table
      • Bitwise Op for Register
      • System Clock
      • Timer
      • USART
      • ADC
  • STM32 M4 Programming
    • Documentation
      • C++ API Docs
    • Firmware Library
      • PinName Configuration
      • GPIO Digital
      • RCC
      • EXTI_SysTick
      • TIMER
      • USART
    • Troubleshooting
    • mbed for STM32
      • Tutorial: mbed-Part 1
      • Tutorial: mbed - Part 2
      • Tutorial: mbed - Part 3
      • Using mbed API on uVision
    • mbed OS
  • Other Programming
    • Arduino
    • Socket Programming
      • Window Socket Programming
      • Arduino WiFi
    • Cube-MX
    • Github
    • Markdown
      • Example: API documentation
    • MATLAB
  • C Programming
    • C-Programming Lessons
      • Installing Visual Studio Community
        • Visual Studio Community 2022
      • Installing VS Code(Mac/Linux)
      • Creating Header Lib
      • Pointer
      • Array
      • 2D Array
      • Structure
      • Dynamic Alloc
      • Bitwise Operation
  • Numerical Programming
    • Syllabus
    • Preparation for NP
    • Math Review
    • Tutorial
      • TA Session Video
      • Tutorial: NP Library Header Files
      • Tutorial - Sine Taylor
      • Tutorial: Passing a Function, Function callback
      • Tutorial: Nonlinear solver
      • Tutorial: Differentiation
      • Tutorial: Integration
      • Tutorial: Matrix Structure
      • Tutorial: Eigenvalue problem
      • Tutorial: ODE-IVP
      • Tutorial: Curve Fitting
      • Tutorial: Create Github Repos of NP lib
      • Tutorial: Version Control in Github
      • Tutorial: Documentation with Markdown
      • Exercise: Version Control and Documentation
    • Example: MATLAB
    • Example: NP Library
    • Assignment
      • Assignment Factorial and Power
      • Assignment: Version Control and Documentation
    • Problem Bank
Powered by GitBook
On this page
  • Version Control
  • Exercise
  • TA Session video
  • When creating a new project for assignments

Was this helpful?

  1. Numerical Programming
  2. Tutorial

Tutorial: Version Control in Github

For Numerical Programming

PreviousTutorial: Create Github Repos of NP libNextTutorial: Documentation with Markdown

Last updated 2 years ago

Was this helpful?

Version Control

In this tutorial, we will learn how to use Github for version control of my library/SW for our numerical method functions.

For each assignment, you probably have created ‘myNM.h, myNM.cpp’ files in every project folder.

If there are multiple source files of the same file name, you may have trouble in controlling the version of your library.

Create and modify myNM.h, myNM.cpp in ‘\include’ folder only

One suggestion is to create and modify your header in a directory and include those files/directory for each project, without copying the header files in the project folder.

After modifying your library source in every assignment, you may have a problem updating to the latest version.

For the version control, you should use git or github. For this tutorial, we will use Github Desktop.

Exercise

TA Session video

  1. Create a private repository for numerical method

    • Example: NumericalProg

  2. Create folders within the repository as instructed in the

3. Maintain your library source filesmyNM.h, myNM.cpp and myMatrix.h, myMatrix.cpp in the ‘\include’ folder only

There should be only 1 copy of your header/lib files in local drive. Include this folder path to include these files in other program projects.

4. Copy your final assignment main() source file in the folder \sources

  • Also, you can copy necessary other files such as data txt

5. Under the \tutorial folder, copy and push tutorial, exercise files of this lecture.

When creating a new project for assignments

1.DO NOT copy the NM header files in each project folder.

2. Configure V.Studio project configuration to include the path for your header files.

  • located in that `\include folder of the Git repository (local drive)

  • For this example, ' ../GithubDesktop/NumericalProg/include'

3. or you can directly include the header files in main().

Tutorial: Create Github Repos of NP lib