This course offers a comprehensive guide to mastering version control with Git, focusing on advanced topics and practical workflows. The course is designed to deepen your understanding of Git through hands-on exercises and real-world scenarios. Topics covered include configuring Git, working with branches and merges, understanding GitHub workflows, managing remotes, and rewriting history. The course aims to equip participants with the skills necessary to efficiently manage and collaborate on projects using Git.
Participants should have taken the Introduction to Version Control and Introduction to Unix course, or be comfortable with the topics that are discussed throughout these courses.
To check for upcoming course dates and to register, please visit the Workshop Schedule and Sign-up page available here.
import pandas as pd
from datetime import datetime
from IPython.display import display, HTML
# Define the course that is being looked at
course_name = "Intermediate Version Control"
# Load the CSV file
file_path = '../data/workshop_info.csv' # Adjust the path to your file location
courses_df = pd.read_csv(file_path)
# Strip any extra spaces in the column names
courses_df.columns = courses_df.columns.str.strip()
# Convert date columns to datetime
courses_df['Start Date'] = pd.to_datetime(courses_df['Start Date'], dayfirst=True, errors='coerce')
courses_df['End Date'] = pd.to_datetime(courses_df['End Date'], dayfirst=True, errors='coerce')
# Get today's date
today = datetime.now()
# Function to generate markdown text based on the course dates
def generate_html(row):
if pd.notna(row['Start Date']) and pd.notna(row['End Date']):
if row['Start Date'] <= today <= row['End Date']:
return f"<div style='font-weight: bold;'>This course is currently accepting applications.</div>"
return ""
# Apply the function and create a new column for Markdown
courses_df['HTML'] = courses_df.apply(generate_html, axis=1)
# Variable for course name
# Filter the DataFrame for the given course name and display the HTML text
html_output = courses_df[courses_df['Course Name'] == course_name]['HTML'].values[0]
display(HTML(html_output))
All CfRR courses require attendees to use their own computer/laptop to follow workshop activities and take effective notes.
Prior to the start of the course, attendees should have Git, a terminal and a code editor installed, and have a GitHub account with credentials configured. We provide suggestions below, but attendees can use alternatives they are already comfortable with (except for Git, which is mandatory).
Git can be obtained from https://git-scm.com/. For Windows users, the Git installer comes with a terminal app Git Bash. For Mac and Linux users, a terminal comes with your system.
The lessons will include demonstrations with VS Code. Attendees familiar with another IDE or editor (such as RStudio or Vim) will be able to follow along with all the exercises.
Attendees can register for a free GitHub account at https://github.com/. Please follow the instructions at Managing your personal access tokens, making a note of your username and personal access token.
The self-study material for this course is available here.
This workshop was influenced by the Introduction to Version Control course for Coding for Reproducible Research (CfRR), and the Pro Git Book.
This workshop was developed by Stephen Cook for the CfRR, with support from members of the RSE Group at the University of Exeter:
from IPython.display import Markdown, display
def display_markdown(file_path):
try:
with open(file_path, 'r') as file:
content = file.read()
display(Markdown(content))
except FileNotFoundError:
print(f"The file {file_path} was not found.")
except Exception as e:
print(f"An error occurred: {e}")
# Example usage:
file_path = '../individual_modules/intermediate_version_control/LICENSE.txt' # Replace with your file path
display_markdown(file_path)
The instructional material in this course is copyright © 2024 University of Exeter and is made available under the Creative Commons Attribution 4.0 International licence (https://creativecommons.org/licenses/by/4.0/). Instructional material consists of material that is contained within the "individual_modules/intermediate_version_control" folders in this repository, with the exception of code snippets and example programs found in files within these folders. Such code snippets and example programs are considered software for the purposes of this licence.
Except where otherwise noted, software provided in this repository is made available under the MIT licence (https://opensource.org/licenses/MIT).
Copyright © 2024 University of Exeter
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
The software in this repository is adapted from software that is covered by the following copyright and permission notice:
Copyright © 2024 Software Carpentry
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.