Skip to content

Latest commit

 

History

History
69 lines (52 loc) · 2.99 KB

2.Git-Setup.md

File metadata and controls

69 lines (52 loc) · 2.99 KB

A review and customization of the Git section in our documentation is essential to ensure that all team members are on the same page regarding version control practices. Here's a tailored guide:


Git Setup

What is Git?

Git is a distributed version control system that's integral to our project. It helps in tracking changes in source code during software development, supporting collaboration among developers.

Installing Git

To work with our project, you'll need to have Git installed on your machine. Git allows you to clone the repository, manage branches, and handle submodules.

  1. Download Git:

  2. Install Git:

    • Follow the instructions provided for your specific OS. Installation is generally straightforward.
  3. Verify Installation:

    • Open a terminal or command prompt.
    • Run git --version to verify that Git is installed correctly. This command should return the installed version of Git.

Basic Git Operations

Our project uses Git for version control, and it's important to be familiar with basic Git operations:

  1. Cloning the Repository:

    • To start working on the project, you’ll need to clone the repository:
      git clone https://github.com/XOwlPost/XO
  2. Working with Branches:

    • Understand how to create, switch, and merge branches:
      git checkout -b <new-branch>  # Create and switch to a new branch
      git checkout <branch-name>    # Switch to an existing branch
      git merge <branch-name>       # Merge a branch into your current branch
  3. Managing Submodules:

    • Our project uses Git submodules, which are versions of other repositories embedded within the main repository.
    • To initialize and update submodules, use:
      git submodule init           # Initialize submodules
      git submodule update         # Update submodules
  4. Making Commits:

    • Track your changes with commits:
      git add <file-name>      # Stage changes for commit
      git commit -m "Commit message"  # Commit your changes
  5. Pushing Changes:

    • Push your commits to the remote repository:
      git push origin <branch-name>

Advanced Git: Using Rebase

We prefer using git rebase over git merge for a cleaner project history. Please refer to the Workflow Tips section for detailed guidance on our rebase workflow.

Conclusion

Git is crucial for our project's version control and collaboration. If you're new to Git, many online resources are available to learn more about its functionalities. For any Git-related issues or questions, feel free to reach out to the team.


Customizing this section to suit the specific needs and practices of our project, especially the emphasis on using git rebase, will help ensure that all team members are aligned in their use of Git for version control.