Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Commit issues #16

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Conversation

Nate004
Copy link

@Nate004 Nate004 commented Jan 2, 2025

I am having problems pulling updates to my local repo. I can only update if these 2 commits are resolved. Kindly help. Thank you

@Nate004 Nate004 requested a review from Elocodes January 5, 2025 18:24
Elocodes
Elocodes previously approved these changes Jan 6, 2025
@Nate004 Nate004 dismissed Elocodes’s stale review January 6, 2025 04:14

The merge-base changed after approval.

@Elocodes
Copy link

Elocodes commented Jan 6, 2025

hello Nate. I cannot merge the changes you referred to because they are already merged to main. This is also why you are seeing this "The merge-base changed after approval."

Regarding your statement "I am having problems pulling updates to my local repo. I can only update if these 2 commits are resolved. Kindly help. Thank you" Can you be a bit more specific? What is the exact error you see when you switch to the branch main and do a "git pull origin main" in your local repository?

@Nate004
Copy link
Author

Nate004 commented Jan 6, 2025

Hi Justina, thanks for the clarifications. The pull request is now successful but I still see that I have some commits to push. When I try pushing with Git push, I get the response:
push error

remote: error: GH006: Protected branch update failed for refs/heads/main.
remote:
remote: - Changes must be made through a pull request.
To github.com:MIT-Emerging-Talent/ET6-foundations-group-11.git
! [remote rejected] main -> main (protected branch hook declined)
error: failed to push some refs to 'github.com:MIT-Emerging-Talent/ET6-foundations-group-11.git'

@Elocodes
Copy link

Elocodes commented Jan 6, 2025

The error you have is because you are trying to push to the branch main. Since this is a team project, things can only be merged to main through a pull request. Here is the workflow that will fix your problem:

  1. do a "git pull origin main" to get the updated changes to main into your local repository
  2. switch to the branch you are working on through a "git checkout "branch name"
  3. do a "git merge main" to pull the updates from main into your branch
  4. do a "git push origin "name of branch" to send your branch to github
  5. come to github and open a pull request on your branch
  6. add it to project board
  7. someone will review, and if everything is okay, they will merge it to main

I hope this clarifies it?

@Nate004
Copy link
Author

Nate004 commented Jan 8, 2025

Thank you Justina

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants