Pythonidaer / reddie

React app for saving and retrieving Reddit comments.
0 stars 1 forks source link

Need develop/test branch(es) for group PRs, local testing prior to main deploys/merges #6

Closed Pythonidaer closed 1 year ago

Pythonidaer commented 1 year ago

I have asked ChatGPT how to do this and will get this done to review group member PRs before working on my next Issue.

Pythonidaer commented 1 year ago

To revert a merge into a main branch on GitHub, follow these steps:

  1. Navigate to the repository on GitHub and click on the branch drop-down menu.
  2. Select the branch that contains the merge you want to revert.
  3. Click on the commit that represents the merge you want to revert.
  4. Click on the "Revert" button in the top right corner of the commit page.
  5. Review the changes that will be made by the revert commit, and add a commit message describing the reason for the revert.
  6. Click on the "Create Revert Pull Request" button to create a new pull request with the revert changes.
  7. Review and merge the pull request to apply the revert changes to the main branch.

Note that reverting a merge does not delete the original merge commit, but instead creates a new commit that undoes the changes introduced by the merge. This is important to keep in mind if you need to reference the original merge commit in the future.

Pythonidaer commented 1 year ago

Yes, it's a good practice to create a separate branch to test changes before merging them to the main branch. Here's a strategy you can follow:

  1. Create a new branch: Create a new branch in your repository, named something like "develop" or "test". This will be your testing branch.
  2. Make your changes: Make your changes in the testing branch, committing and pushing regularly.
  3. Test locally: Once you have made some changes, you can test them locally on your machine.
  4. Share the branch: Share the testing branch with your team or anyone else who needs to review the changes.
  5. Get feedback: Encourage others to test and review your changes. They can check out the testing branch and test the changes locally on their machines.
  6. Merge to main: Once everyone is satisfied with the changes, you can merge the testing branch to the main branch.

This strategy helps you catch any issues or bugs before they make it to the main branch. It also allows others to review and provide feedback on your changes, which can lead to a higher quality end result.

In summary, creating a separate testing branch is a good strategy for testing changes before merging them to the main branch. This helps catch issues early and allows for collaboration and feedback from others on the team.

Pythonidaer commented 1 year ago

You can create a test branch for your GitHub repository using either the GitHub website or the command line interface (CLI) on your terminal.

Using the GitHub website to create the test branch is more straightforward and requires fewer steps. Here's how you can create a test branch on the GitHub website:

  1. Navigate to your repository on the GitHub website.
  2. Click on the "Branches" tab.
  3. Type the name of the new branch you want to create in the "Create a new branch" field.
  4. Choose the branch you want to base your new branch off of. Typically, this will be the "main" branch.
  5. Click on the "Create branch" button.

If you prefer to use the CLI to create the test branch, you can follow these steps:

  1. Open your terminal and navigate to your local repository.
  2. Type the following command to switch to the "main" branch: git checkout main.
  3. Type the following command to create a new branch: git checkout -b test.
  4. Push the new branch to the remote repository on GitHub using the following command: git push --set-upstream origin test.

These steps will create a new branch named "test" and set it as the current branch in your local repository. The git push command will push the new branch to the remote repository on GitHub.

Either approach is valid, so it's up to your personal preference and comfort level with using either the GitHub website or the command line.

Pythonidaer commented 1 year ago

To review more comments, search for the "GitHub merge revert" ChatGPT conversation.