Skip to content
QYF-RYCBStudio edited this page Aug 23, 2024 · 2 revisions

Introduction to Git and Pull Requests

What is Git?

Git is a version control system that helps you manage and track changes in your code or documents over time. It allows multiple people to work on the same project without interfering with each other's work. Here are some key features of Git:

  • Version Control: Keeps a history of changes, so you can revert to previous versions if needed.
  • Collaboration: Multiple people can work on the same project simultaneously.
  • Branching: You can create branches to work on new features or fixes without affecting the main codebase.

What is a Pull Request?

A Pull Request (PR) is a way to propose changes to a project in Git. When you have made changes in your branch and want to merge them into the main branch (often called main or master), you create a Pull Request. Here’s how it works:

  1. Make Changes: You create a new branch and make changes to the code.
  2. Push Changes: You push your changes to the remote repository (e.g., GitHub).
  3. Create a Pull Request: You open a Pull Request to ask others to review your changes.
  4. Review: Other team members can review your changes, comment, and suggest improvements.
  5. Merge: Once approved, your changes can be merged into the main branch.

Summary

  • Git: A tool to track changes and collaborate on projects.
  • Pull Request: A request to merge your changes into the main project, allowing for review and discussion.

By using Git and Pull Requests, teams can work more efficiently and maintain the quality of their code.


Git and GitHub: The Dynamic Duo

What is GitHub?

GitHub is a web-based platform that hosts the Git version control system. It provides a centralized location for developers to store, manage, and collaborate on their Git repositories. GitHub offers a range of features, such as:

  • Remote Repositories: Allows you to store your Git repositories on GitHub's servers, making it easier to share and collaborate with others.
  • Issue Tracking: Provides a way to report, track, and discuss bugs, feature requests, and other project-related issues.
  • Pull Requests: Facilitates the process of merging changes from one branch into another, with the ability to review, comment, and discuss the changes.
  • Collaboration Tools: Enables team members to work together on projects, assign tasks, and track progress.

The Relationship Between Git and GitHub

While Git is the version control system, GitHub is a service that hosts Git repositories and provides a web-based interface for working with them. Here's how they work together:

  1. Local Git Repository: You use Git on your local machine to create, manage, and track changes in your project.
  2. Remote GitHub Repository: You then create a remote repository on GitHub, which serves as a centralized location for your project.
  3. Synchronization: You can push your local Git repository to the remote GitHub repository, allowing others to access and collaborate on your project.
  4. Collaboration: Team members can clone the remote GitHub repository, make changes, and submit Pull Requests to have their changes merged into the main project.

Benefits of Using Git and GitHub Together

  • Centralized Collaboration: GitHub provides a centralized platform for your team to work on the same project, making it easier to coordinate and track changes.
  • Backup and Sharing: Storing your Git repositories on GitHub ensures that your code is backed up and can be easily shared with others.
  • Issue Tracking and Project Management: GitHub's issue tracking and project management features help you organize and manage your project more efficiently.
  • Community and Ecosystem: GitHub is the largest host of source code in the world, with a vibrant community of developers and a vast ecosystem of open-source projects.

By using Git and GitHub together, developers can take advantage of the powerful version control system and the collaborative features provided by the GitHub platform.


How can I contribute to this repository?

Use Github website

Search or create files

  1. Fork: click the "fork" button on the top side of the main page. When you click, it will jump to the "create new fork" page. After you check things ready, click "Create Fork" to continue. It will jump to the page of your forked repository.
  2. Search: make sure you're on the "Code" page. Click "Go to file" above the file tree. Input Namespace Lookup. The input box is next to "Add file ▼", please select there if focus is lost.
  3. Find file: if the list below shows a file that matches the "file path", select it and skip to the next section "commit changes", otherwise continue with step 4.
  4. New file: select "Code" in the navigation bar to return to the home page and open the Languages directory. Select "Add file">"Create new file" in the upper right corner, and in the input box of "Name your file", enter {Your language to translate}.json.{Your language to translate} must follow the ISO specification.(language_(COUNTRY or REGION).json)

(For people who read this by a translator, you might not know the clear file name standard. Look at below:

Samples: []-optional, a~z-lowercase letters, A~Z-uppercase letters.

language_COUNTRY.json or language_REGION.json

e.g. zh_CN.json en_US.json

Commit changes

  1. Enter editing: click the pen shape in the upper right corner of the file to enter editing. If a new file is created, it is already in editing.
  2. Make changes: make the changes you want. For example, paste the whole local translation document.
  3. Commit: pull to the bottom of the page and click "Commit changes" or "Commit new file" in green.
  4. Prepare Pull Request: return to the "Code" page of the repository, click "Pull request" at the top, then click "New pull request", and click "compare across forks" in the popped up page, so that the lower comparison box is in a state similar to "base repository: RYCBStudio/RYCBEditorX.Glob…". Then change the "head repository" to your repository (it will automatically be yours if there's no problem) and compare to the branch created in step 3. If this is done correctly, the changes you submitted in the previous step should appear below.
  5. Fill in the main dialogue of Pull Request: click Create pull request. If there are other matters to be explained, insert them before those prompts.
  6. Submit Pull Request: click "Create pull request" at the bottom right of the input box to create a PR. If the localization is not completed, you can create draft PR by clicking the "▼" on the right side of "Create pull request" and then click "Create draft pull request".

Clone this wiki locally