-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5a86d98
commit cb09f2d
Showing
1 changed file
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
Git Assignment | ||
|
||
a. What is an _issue_? | ||
|
||
An issue in GitHub is a way to track tasks, enhancements, bugs, or questions related to a project. It is used for project management and communication between collaborators. Users can open, discuss, and resolve issues within a repository. | ||
To creat issue If we found a bug, or a new feature Idea. We have Go to the GitHub repository of the project and click the Issues tab. In there click the New Issue button and describe the bug or feature and Submit voila! and we have created a new Issue, also we have a green square in your GitHub heatmap. | ||
|
||
> b. What is a _pull request_? | ||
|
||
A pull request, often abbreviated as PR, serves as a proposal to merge changes made in one branch of a repository into another, typically from a feature branch into the main branch. Pull requests are essential for facilitating code reviews, encouraging collaboration, and maintaining a clean, well-documented codebase. | ||
Feature Additions: A developer adds a new feature, like password reset, and creates a pull request to merge it into the main branch after approval. | ||
Bug Fixes: A separate branch is made to fix a discovered bug, and a pull request is created for team review and integration. | ||
Code Refactoring: Developers refactor code for better performance or readability and submit a pull request for team approval. | ||
|
||
> c. Describe the steps to open a _pull request_? | ||
|
||
Create a branch: First, create a new branch in the repository for the feature or fix you're working on. | ||
Make changes: Modify files, commit the changes, and push them to your branch. | ||
Open the pull request: | ||
Go to the repository on GitHub. | ||
Click on the "Pull Requests" tab. | ||
Click "New Pull Request." | ||
Choose the branches (your feature branch and the base branch, usually main). | ||
Write a descriptive title and description for the pull request. | ||
Submit the pull request: Once ready, click "Create Pull Request." Collaborators can now review the changes. | ||
|
||
> d. Describe the steps to add a collaborator to a repository (share write permissions) | ||
|
||
We have to go to your repository on GitHub. | ||
Click on the "Settings" tab. | ||
In the left sidebar, click on "Collaborators." | ||
Under the "Collaborators" section, type the username or email of the person you want to add. | ||
Click "Add Collaborator." | ||
The invited user will receive an email invitation, which they must accept to gain write access. | ||
|
||
> e. What is the difference between `git` and `GitHub`? | ||
Git is a version control system used to track changes in source code during software development. It allows multiple developers to work on a project simultaneously, keeping track of changes and managing code versions. | ||
GitHub is a cloud-based hosting service for Git repositories. It provides a web interface to manage Git repositories, collaborate with other developers, and use features like pull requests, issues, and more. | ||
|
||
> f. What does `git diff` do? | ||
The git diff command shows the changes between two versions of files. It compares what is in your working directory with the last commit, showing what has been added, removed, or modified. This is useful for reviewing changes before committing. | ||
|
||
|
||
> g. What is the `main` branch? | ||
The main branch (previously called master branch) is the default branch in a Git repository. It is typically where the stable, production-ready version of the code resides. Changes are usually merged into the main branch after they are reviewed and tested. | ||
|
||
> h. Besides our initial commit if it is a new repository, should we directly push our changes directly into the `main` branch? | ||
|