xplain the fundamental concepts of version control and why GitHub is a popular tool for managing versions of code. How does version control help in maintaining project integrity? version control helsp us track changes to code, enabling collaboration and history tracking, Github enhances this by providing cloud-based repository hosting and collaboratio tools
Describe the process of setting up a new repository on GitHub. What are the key steps, and what are some of the important decisions you must make during this process? go to a GitHub account click on new repository name the repository choose if public or private initialize with README copy the repository URL and use
Discuss the importance of the README file in a GitHub repository. What should be included in a well-written README, and how does it contribute to effective collaboration? it describes the project , its purpose , installation steps,usage instruction and contribution guideliness
Compare and contrast the differences between a public repository and a private repository on GitHub. What are the advantages and disadvantages of each, particularly in the context of collaborative projects?public repositories is visible to anyone suitable for open-source project while the private repositories is restricted access, used for confidential project
Detail the steps involved in making your first commit to a GitHub repository. What are commits, and how do they help in tracking changes and managing different versions of your project? 1. modify or add files 2. use git add. to stage changes 3. use git commit -m "initial commit" to save changes 4. use git push origin main to upload to Github
How does branching work in Git, and why is it an important feature for collaborative development on GitHub? Discuss the process of creating, using, and merging branches in a typical workflow. a brach allows working on a feature or bug fix separately from the main code. basic braching create a branch switch to the branch merge the branch into branching prevents breaking the main code allows multiple developers to work on feature simultaneouly makes it easire to test and review new changes
Explore the role of pull requests in the GitHub workflow. How do they facilitate code review and collaboration, and what are the typical steps involved in creating and merging a pull request? a pull request allows developers to propose changes before merging into the main branch . steps of creating a pull request
- push changes to a new branch
- on GitHub, go to the repository and click New pull request
- select the base branch and the the feature branch
- add a description and click create pull request
- review and merge
Discuss the concept of "forking" a repository on GitHub. How does forking differ from cloning, and what are some scenarios where forking would be particularly useful? forking is an independent, changes dont affect the original whereas clonin still linked to the original, allowing pull request forking creates a separate copy of a repository in your account whereas cloning download s a copy of the repository to your local machine
Examine the importance of issues and project boards on GitHub. How can they be used to track bugs, manage tasks, and improve project organization? Provide examples of how these tools can enhance collaborative efforts. to organise tasks useful for large project teams bugs, feature request , task
Reflect on common challenges and best practices associated with using GitHub for version control. What are some common pitfalls new users might encounter, and what strategies can be employed to overcome them and ensure smooth collaboration common challenges include common challenges Merge conflict which happens when multiple changes affect the same code, accidental deletionwhch is recovered through git reset also working on a wrong brach one should always check current branch