Skip to content

excellalabs/gitfundamentals

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 

Repository files navigation

GIT Fundamentals

What is Git? Git is a widely-used distributed version control system that allows multiple people to work on a project simultaneously without overwriting each other's changes. It helps track changes to files, manage project history, and collaborate efficiently on code. Git is particularly popular in software development due to its flexibility and powerful branching capabilities, but it is also valuable in other fields that involve file management and collaboration.

Key Features of Git:

Version Control: Tracks changes to files over time, allowing you to revert to previous versions if necessary.
Branching and Merging: Enables multiple people to work on different parts of a project simultaneously, merging changes when ready.
Collaboration: Facilitates collaboration between team members, making it easy to share and review code.
History Tracking: Maintains a history of changes, providing insight into what was changed, who changed it, and why.

Data Analysis Use Cases:

  1. Version control for analysis scripts - provides clear record of change as scripts are updated
  2. Collaboration on analysis projects - multiple analysts can contribute to a shared repo
  3. Documentation and Reproducibility - using the README and having well commented code
  4. Jupyter Notebooks version control
  5. Automated Reporting and Dashboards

Data Engineer Use Cases:

  1. Version Control for Data pipelines
  2. Infrastructure as Code management - Terraform
  3. Collaboration on DE projects
  4. Managing Data Schema changes
  5. Deployment automation with CI/CD Pipelines
  6. Backups and disaster recovery - ensuring that pipelines can be restored quickly in the event of a failure

GIT Use Cases

  1. Adding a New Feature (Chapter in our case) - #1
  2. Fixing a Bug (Fixing a typo in chapter #3) - #3
  3. Submit an addition to chapter #2 - #2, #4
  4. Rebase long standing branch with main - https://github.com/excellaco/gitfundamentals/compare/long_standing_branch...main
  5. Merge conflict while adding addition to chapter #2 -

Common Pitfalls

  1. Poor Commit Practices
    • Problem: using "fixed stuff" or "test" as commit messages - Making uninformative or overly large commits can make it challenging to track changes and understand the project's history
    • Solution:
      • Meaningful commit messages
      • Smaller commits
  2. Merge Conflict Mismanagement
    • Problem:
      • Automatically accepting changes without understanding the conflict.
      • Overwriting important code or data while resolving conflicts.
    • Solution:
      • Carefully review and resolve merge conflicts by understanding both sets of changes.
      • Use tools like Git's built-in merge conflict markers or visual merge tools to assist in the process
      • Commit and Merge often and avoid long living branch
      • Trunk Based Development!
  3. Not Using Branches Effectively
    • Problem:
      • cluttered main branch
      • hard to manage different features or fixes
    • Solution:
      • Defining and using a branching strategy that suits your workflow
      • Popular Branching strategies: Git Flow, Main/Trunk Based Development

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published