Git

Intro to Git


Progress
Reviewed: 0%
8 Tasks


If you're new to version control and want to learn how to use Git effectively, this beginner-friendly course is perfect for you. Git is a powerful and widely used version control system that allows you to track changes in your code, collaborate with others, and safely manage your projects. In this course, you'll start from the basics and gradually build your skills to become proficient in using Git for your development workflow.

Begin by creating a GitHub account.
1. Once you have your account, create a new repository with the name "skill_captain_git".
2. Inside this repository, organize your daily assignments by creating a separate folder for each day's work. Name each folder "day".
3. Make sure to add your assignments to the respective day's folder to keep them organized and easily accessible.
By following these steps, you'll have a GitHub account with a repository specifically designed for your Git assignments, neatly organized by day.


  • Day 6
  • Branching Strategies and Workflow in Git

    Concept:



    Resources:



    Assignments:


    Assignment: Branching Strategies and Workflow in Git
    Objective: Apply the concepts learned in the tutorial on Branching Strategies and Workflow in Git to complete the following assignment.
    Assignment Steps:
    1. Branching Strategies:
    a. Create a new Git repository locally.
    b. Implement the feature branch strategy by creating a branch named "feature-login" and another branch named "feature-logout".
    c. Make changes related to the login functionality in the "feature-login" branch and changes related to the logout functionality in the "feature-logout" branch.
    d. Commit your changes and push the branches to a remote repository.
    2. Git Workflow:
    a. Create a new branch named "develop" from the main branch.
    b. Make additional changes and commits related to both login and logout functionality in the "develop" branch.
    c. Push the "develop" branch to the remote repository.
    d. Merge the "develop" branch into the main branch.
    3. Pull Requests and Code Reviews:
    a. Fork the repository of a fellow classmate or a public repository on a Git hosting platform (e.g., GitHub).
    b. Create a new branch in your forked repository and make changes to fix a bug or add a new feature.
    c. Open a pull request from your branch to the original repository.
    d. Ask one of your classmates or a friend to review your code by leaving comments and suggestions on the pull request.
    e. Address the feedback provided by the reviewer, make necessary changes, and update the pull request.
    f. Once the pull request is approved, merge it into the original repository.
    4. Working with Upstream Repositories:
    a. Find an open-source project on GitHub that you are interested in contributing to.
    b. Fork the repository to create your copy.
    c. Add the original repository as an upstream remote.
    d. Fetch the latest changes from the upstream repository and merge them into your local repository.
    e. Make additional changes or improvements to the code.
    f. Push your changes to your forked repository.
    g. Open a pull request from your forked repository to the original repository.
    Submission Guidelines:
    - Create a github read me that includes a step-by-step description of your actions, including the Git commands used in each step.
    Note: Remember to practice good Git hygiene, follow best practices for branch naming and commit messages, and maintain a clean and organized Git history. Completing this assignment will provide hands-on experience with branching strategies, implementing a Git workflow, working with pull requests and code reviews, and collaborating with upstream repositories. It will strengthen your understanding of these concepts and help you become more proficient in using Git for collaborative development.



  • Day 7
  • Tutorial: Resolving Conflicts in Git

    Concept:



    Resources:



    Assignments:


    Assignment: Resolving Merge Conflicts in Git
    Objective: Apply the concepts learned in the tutorial on Resolving Conflicts in Git to complete the following assignment.
    Assignment Steps:
    1. Conflict Simulation:
    a. Create a new repository locally.
    b. Create a new branch named "conflict-branch" from the main branch.
    c. Make changes to a specific file in both the main branch and the "conflict-branch", deliberately introducing conflicting modifications.
    d. Commit and push the changes to the remote repository.
    2. Resolving Conflicts:
    a. Fetch the latest changes from the remote repository to ensure you have the most up-to-date code.
    b. Merge the main branch into the "conflict-branch" using the `git merge main` command.
    c. Observe the merge conflict message and the files marked with conflict markers.
    d. Open the conflicting file(s) in a text editor and resolve the conflicts manually, choosing the desired changes from both branches.
    e. Remove the conflict markers and save the file(s).
    f. Stage the modified file(s) using `git add ` command.
    g. Commit the changes with an appropriate commit message using `git commit`.
    h. Push the resolved conflicts to the remote repository.
    3. Collaboration and Code Review:
    a. Share your repository with a classmate or a friend.
    b. Ask them to simulate conflict situations by making changes to the same file(s) you modified earlier.
    c. Both of you should attempt to merge each other's branches and resolve any conflicts that arise.
    d. Collaboratively review each other's conflict resolution process, provide feedback, and suggest improvements.
    e. Document the conflict scenarios, the conflict resolution process, and any important decisions or considerations made during the resolution.
    4. Reflective Analysis:
    Write a reflective analysis of your experience with conflict resolution in Git. Address the following points:
    - Describe the challenges faced during conflict resolution and how you overcame them.
    - Discuss the strategies and Git tools you utilized to effectively resolve conflicts.
    - Reflect on the collaboration and code review process, including the benefits and challenges encountered.
    - Explain the importance of documenting conflict resolutions and the impact it can have on future developers.
    Submission Guidelines: - Submit a github read me that includes a step-by-step description of your actions, including the Git commands used in each step.



×

Let's Go!

Congratulations on getting started. Here is a little reward for you...

×

10

Going to the next task in