Skip to content

Repository for Version Control Workshop conducted on October 16th, 2023.

License

Notifications You must be signed in to change notification settings

tcet-opensource/Version-Control-Workshop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 

Repository files navigation

TCET Open Source Logo

TCET Open Source Git-GitHub Workshop

Welcome to the TCET Open Source Git-GitHub Workshop! 🚀

This repository is designed to help you get started with version control using Git and GitHub. Whether you're a beginner or looking to refresh your knowledge, we've got you covered.

Note

Why no PRs are merged?

There are few reasons why no PRs are merged to the main branch

Key Issues

  • Base Branch Mismatch: All the submitted PRs are created with the main branch as the base. While this is a common practice, it can lead to problems when multiple contributors are working on different features simultaneously.
  • Merge Conflicts: Due to the base branch mismatch, when a PR is merged, it can cause merge conflicts with other pending PRs. These conflicts occur because the main branch has changed since the other PRs were created, making it difficult or impossible to automatically merge the changes.

Understanding the Problem

  • When you fork a repository and make changes in your local branch, you're working on a snapshot of the original repository at the time you forked it. Meanwhile, the original repository (upstream) continues to evolve as other contributors merge their changes.

Here's what happens:

  • You fork the repository and create a branch based on the main branch.
  • You make changes and submit a PR to the original repository's main branch.
  • Before your PR is reviewed or merged, another PR gets merged into the main branch.
  • Now, your PR is based on an outdated version of the main branch, causing a merge conflict.

Solution

  • Keep Your Fork Updated: Regularly synchronize your fork with the upstream repository using git pull upstream main. This ensures that your fork's main branch stays up-to-date with the latest changes.
  • Rebase Your Branch: Before submitting a PR or after updating your fork, rebase your feature branch onto the latest main:
    git checkout feature/your-branch
    git rebase origin/main
    This applies your changes on top of the latest main, reducing the likelihood of merge conflicts.
  • Branch Management: Create a new branch for each feature, bug fix, or task you're working on. Use descriptive branch names like feature/add-login, bugfix/fix-memory-leak, or docs/update-readme. This keeps your changes isolated and makes it easier to manage conflicts.

What is Git and GitHub?

Git is a distributed version control system that helps you track changes in your project's source code over time. It allows multiple contributors to collaborate on a project efficiently.

GitHub is a web-based platform that provides Git repository hosting, collaboration tools, and a community of developers to help manage your Git projects. It makes working with Git easier and more accessible.

How to Get Started

  1. Fork this Repository: Click the "Fork" button at the top right of this page to create your copy of the repository. This will allow you to make changes without affecting the original.

image

  1. Clone your Fork: After forking, open your forked repository and click the "Code" button. Copy the repository URL. Then, open your terminal and run the following command, replacing [your-username] with your GitHub username:

    git clone https://github.com/[your-username]/TCET-Open-Source-Workshop.git

Commit Your Name: Open the name.html file, and add your name to the list of contributors. Then, commit your changes with the following commands:

git add name.html
git commit -m "Added [Your Name] to the contributors"
git push

Create a Pull Request: Go back to your forked repository on GitHub, and you'll see a green "Compare & Pull Request" button. Click it to create a pull request to the original repository. Your contribution will be reviewed and merged!

Open Source Contribution

We believe in the power of open source collaboration. By participating in this workshop, you're not only learning but also contributing to the global open source community. Every contribution counts!

Resource

Resource

Social Links

Connect with us

Twitter     Instagram     Discord     Gmail     LinkedIn    

Happy coding and collaborating! 💻✨

About

Repository for Version Control Workshop conducted on October 16th, 2023.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages