Skip to content

Some useful links about Git, GitHub and Azure DevOps to start with your repositories

Notifications You must be signed in to change notification settings

erossini/GitExercises

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Git Exercises

Why git?

hitygcjctyfckgiktyujvtug

For a thorough discussion on the pros and cons of Git compared to centralized source code control systems, see the web. There are plenty of flame wars going on there. As a developer, I prefer Git above all other tools around tody. Git really changed the way developers think of merging and branching.

From the classic CVS/Subversion world I came from, merging/branching has always been considered a bit scary (“beware of merge conflicts, they bite you!”) and something you only do every once in a while.

But with Git, these actions are extremely cheap and simple, and they are considered one of the core parts of your daily workflow, really.

Plan

Install Git. Markdown

GitHub

  • Create your account with GitHub
  • Clone this repository
  • Create a pull request
  • Review and peer review
  • Fork this repository
  • Manage conflicts
  • Create a Wiki
  • Create your personal page

Azure DevOps

  1. If you don't have one, create a Microsoft account.

  2. Go to Azure DevOps and select Get started with Azure.

  3. Select either Try Azure for free or Pay as you go.

  4. Enter your Microsoft account credentials and go through the sign-up process. Azure DevOps creates an organization:

    • If you signed up with a newly created Microsoft account, Azure DevOps creates a project named after your account.
    • If you signed up with an existing Microsoft account, create a project next. Sign in to your organization at any time: https://dev.azure.com/{Your_Organization}.

Documentation

Software

Exercices

  • GeeksforGeeks: Offers simple Git exercises, practice questions, and solutions suitable for all skill levels.
  • WebUtility.io: Provides a Git Simulator for hands-on practice with Git commands and workflows directly in your browser.
  • Git Exercises: A dedicated platform to learn and practice Git with various exercises. These resources will help you level up your Git knowledge effectively!

Build a Collaborative Story

Students will collaboratively build a short story using Git. Each student contributes a paragraph, practices branching, merging, and resolving conflicts.

🧑‍🏫 Setup

  • Each student should have Git installed and access to GitHub or another Git hosting service.
  • Instructor creates a public repository called collaborative-story.

📝 Instructions

  1. Clone the Repository
git clone https://github.com/erossini/GitExercises.git
cd GitExercises
  1. Create a New Branch

Each student creates a personal branch:

git checkout -b student-name-story
  1. Add a Paragraph

Edit the file story.txt and add a paragraph at the end.

  1. Commit the Change
git add story.txt
git commit -m "Added my paragraph to the story"
  1. Push the branch
git push origin student-name-story
  1. Create a Pull Request

Students open a pull request to merge their branch into main.

  1. Review & Merge

Peers review the pull request and merge it.

  1. Conflict Resolution (Optional Challenge)

If two students edit the same line, Git will show a conflict. Instructor can simulate this and guide students through resolving it:

git pull origin main
# Resolve conflict in story.txt
git add story.txt
git commit -m "Resolved merge conflict"

Create your personal bio

Create a new repository

  • Go to your GitHub account and click "New repository".
  • Name the repository exactly the same as your username.

Example: If your username is erossini, the repo name should be erossini.

Make it public

The repository must be public for the README to show on your profile.

Check "Add a README file"

GitHub will automatically detect this and display the README on your profile.

Customize your README

You can use Markdown to add:

  • Text ✍️
  • Images 🖼️
  • Links 🔗
  • Emojis 😎
  • Badges 🚀

Example:

# Hi, I'm Enrico 👋

- 🔭 I’m currently working on open-source projects
- 🌱 Explaining GitHub
- 📫 Reach me at [My Website](https://puresourcecode.com)

![GitHub Stats](https://github-readme-stats.vercel.app/api?username=erossini&show_icons=true)

About

Some useful links about Git, GitHub and Azure DevOps to start with your repositories

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors