c-proof / cproofwebsite

Other
0 stars 3 forks source link

Dev #5

Open juliaputko opened 2 years ago

jklymak commented 2 years ago

Hi julia. You still have a bunch of untested commits in here. If we merge this bad things will happen to the repo. See https://stackoverflow.com/questions/16306012/github-pull-request-showing-commits-that-are-already-in-target-branch and the answer that explains how to do a rebase.

juliaputko commented 2 years ago

Hi Jody,

So, I should rebase to my main branch on my fork and then make the pull request from there, and that would remove all of those other commits? Would you be able to review that these commands make sense?

My origin and upstream: origin @.:juliaputko/cproofwebsite.git (fetch) origin @.:juliaputko/cproofwebsite.git (push) upstream https://github.com/c-proof/website.git (fetch) upstream https://github.com/c-proof/website.git (push)

The sequence of commands I would use:

Git fetch origin Git checkout dev Git rebase origin/master Git push --forece-with lease

Thank you, Julia Putko

On Mar 26, 2022, at 2:52 AM, Jody Klymak @.***> wrote:

Hi julia. You still have a bunch of untested commits in here. If we merge this bad things will happen to the repo. See https://stackoverflow.com/questions/16306012/github-pull-request-showing-commits-that-are-already-in-target-branch https://stackoverflow.com/questions/16306012/github-pull-request-showing-commits-that-are-already-in-target-branch and the answer that explains how to do a rebase.

— Reply to this email directly, view it on GitHub https://github.com/c-proof/cproofwebsite/pull/5#issuecomment-1079652007, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATOOXH5TFHSQC2JMCDO5XE3VB3M4JANCNFSM5RVOKERA. You are receiving this because you authored the thread.

jklymak commented 2 years ago

Almost:

git fetch origin
git fetch upstream
git checkout dev
git rebase upstream/master
# if that goes well:
git push origin/dev --force-with-lease # maybe with-lease?  I dunno, I never do that ;-). Hmm, but [https://itnext.io/git-force-vs-force-with-lease-9d0e753e8c41](this) says to use it.
jklymak commented 2 years ago

You may find this visualization helpful. https://medium.com/coder-life/git-rebase-a-powerful-command-brings-your-git-skills-to-the-next-level-part-ii-1fcc64a81781

juliaputko commented 2 years ago

Hi Jody,

Thank you for that. I am unable to view the article by medium you sent. I would still appreciate a screenshot of the visualization if you think it would be helpful!

I am attempting the git rebase, and I am encountering a lot of conflicts I have to merge manually - should I be accepting these incoming changes (not changes I have made - seems like changes you have made), or are these the untested commits you are referring to?

Best, Julia Putko

On Mar 29, 2022, at 7:04 AM, Jody Klymak @.***> wrote:

You may find this visualization helpful. https://medium.com/coder-life/git-rebase-a-powerful-command-brings-your-git-skills-to-the-next-level-part-ii-1fcc64a81781 https://medium.com/coder-life/git-rebase-a-powerful-command-brings-your-git-skills-to-the-next-level-part-ii-1fcc64a81781 — Reply to this email directly, view it on GitHub https://github.com/c-proof/cproofwebsite/pull/5#issuecomment-1081914348, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATOOXH5JHNUJCLO5D2ENAKTVCMEYFANCNFSM5RVOKERA. You are receiving this because you authored the thread.

jklymak commented 2 years ago

OK, lets start over.

First copy the files you have changed somewhere else...

Make a new branch and force it to upstream/master

git checkout -b fresh
git reset --hard upstream/master

Now add back one file you have changed. Do a git diff and you should only see the changes in your file.

If you have added a completely new file that was not on master:

git add path/to/your/new/file

Now do

git commit -a -m "ENH: Julia's new version"
git push origin fresh

and make a pull request. You should only have the new commit in the pull request. OK, you can prob scratch that pull request, but then do the same for all of your changes and make a pulse request from that.