CSIRO Ag&Food Data School

Intro to command lines and Git, revision activities

Git Basics Challenge: Project Version Management

You are a developer working on a new project. Your task is to demonstrate your Git skills by creating a repository, managing multiple features through branching, integrating these features, and marking a release version.

Specifically, you need to:

  1. Set up a new project repository
  2. Develop two separate features in different branches
  3. Update the main project line independently
  4. Integrate all the work
  5. Mark your first release version

Complete this task using Git in your Bash terminal. Try to do as much as you can without referring to the instructions below. Use the instructions only if you get stuck or want to verify your approach.

Supporting Instructions

(Use only if needed!)

  1. Initialize the project:
    • Create and navigate to a new directory
    • Initialize a Git repository
    • Create an initial file, stage, and commit it
  2. Develop the first feature:
    • Create and switch to a new branch
    • Add a new file for this feature
    • Stage and commit your changes
  3. Develop the second feature:
    • Create and switch to another new branch (from main)
    • Add a different file for this feature
    • Stage and commit your changes
  4. Update the main project:
    • Switch back to the main branch
    • Modify the initial file
    • Stage and commit these changes
  5. Integrate the work:
    • Merge both feature branches into the main branch
    • Resolve any merge conflicts if they occur
  6. Mark the release:
    • Create an annotated tag for your first release

7 Review your work:
- Display the commit history showing all branches and tags

« Back Next »