Mika215 / to-do-list-app-group-3

A simple To-Do list App project
https://mika215.github.io/to-do-list-app-group-3/
MIT License
0 stars 1 forks source link

(SOLVED) I can't push my changes. #22

Open JTLiberona opened 3 years ago

JTLiberona commented 3 years ago

Unfortunately I can't push my changes from REMOTE(MyClone) to ORIGIN(Michael's repo, which is the fork of up-stream).

I just updated today my availability for the week and these were the step i followed:

  1. git fetch / git pull
  2. Made my changes in the communication-plan.md 1.1 again git fetch / git pull (just in case there was any other change)
  3. git add communication-plan.md
  4. git commit -m 'my commit msg'
  5. git push

But i got the following message in my terminal.

➜ planning git:(tempo) git push origin tempo Enumerating objects: 7, done. Counting objects: 100% (7/7), done. Delta compression using up to 8 threads Compressing objects: 100% (4/4), done. Writing objects: 100% (4/4), 444 bytes | 444.00 KiB/s, done. Total 4 (delta 3), reused 0 (delta 0) remote: Resolving deltas: 100% (3/3), completed with 3 local objects. remote: error: GH006: Protected branch update failed for refs/heads/tempo. remote: error: At least 1 approving review is required by reviewers with write access. To https://github.com/Mika215/to-do-list-app-group-3.git ! [remote rejected] tempo -> tempo (protected branch hook declined) error: failed to push some refs to 'https://github.com/Mika215/to-do-list-app-group-3.git'

I took a look in many websites and obviously stack over the flow and it just refer to permissions problems.

....If you do, then ...

Thanks in advance.

NOTE: This happend after the change of the name of the repo. I don't know if it has any influence in the issue I'm actually having. Screenshot from 2021-08-23 23-49-22

JTLiberona commented 3 years ago

Ok, got it. @RosaMoran gave me the HINT! Thanks ... IDK what i was thinking on ... -.-

I realized i was trying to push changes directly to tempo, but tempo is an ADMIN branch(with admin's privileges) and ALSO, very important, needs a mandatory review. So then I just fetch the tempo branch into my css-JT branch.

These were the following steps;

  1. $ git checkout tempo

  2. ➜ planning git:(tempo) $ git pull tempo css-JT From https://github.com/Mika215/to-do-list-app-group-3

    • branch css-JT -> FETCH_HEAD Already up to date.
  3. ➜ planning git:(tempo) $ git checkout css-JT Switched to branch 'css-JT' Your branch is up to date with 'origin/css-JT'.

  4. ➜ planning git:(css-JT) $ git remote -v origin https://github.com/Mika215/to-do-list-app-group-3.git (fetch) origin https://github.com/Mika215/to-do-list-app-group-3.git (push) tempo https://github.com/Mika215/to-do-list-app-group-3.git (fetch) tempo https://github.com/Mika215/to-do-list-app-group-3.git (push) upstream https://github.com/HackYourFutureBelgium/separation-of-concerns-starter.git (fetch) upstream https://github.com/HackYourFutureBelgium/separation-of-concerns-starter.git (push)

  5. ➜ planning git:(css-JT) $ git add communication-plan.md

  6. ➜ planning git:(css-JT) ✗ $ git commit -m 'JTs availability update' [css-JT db101e2] JTs availability update 1 file changed, 2 insertions(+), 2 deletions(-)

  7. ➜ planning git:(css-JT) $ git push
    Enumerating objects: 11, done. Counting objects: 100% (11/11), done. Delta compression using up to 8 threads Compressing objects: 100% (8/8), done. Writing objects: 100% (8/8), 1.01 KiB | 1.01 MiB/s, done. Total 8 (delta 5), reused 0 (delta 0) remote: Resolving deltas: 100% (5/5), completed with 2 local objects. To https://github.com/Mika215/to-do-list-app-group-3.git 6dd3103..db101e2 css-JT -> css-JT I didn't wanted to create a new one with my availability but I think it would be better if in a future we create an specific branch for planning out of ADMIN privileges, so then everyone can make changes on it. (If I'm wrong just give me a hint).

See you tomorrow guys !!

perezrei commented 3 years ago

Good morning @JTLiberona . I see 2 things at least in your steps:

  1. Before, you have to do git pull origin tempo to update your local.

  2. After, if you want to push the changes you have to do git push origin 'your branch'

RosaMoran commented 3 years ago

@JTLiberona hey you made a push from tempo if you see the branch here you''ll find it can you see it please :smile: