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

Minor edits to what_is.md, getting_started.md, and terminology_and_concepts.md #280

Closed
wants to merge 1 commit into from

Conversation

gregorgorjanc
Copy link
Member

OK, I now followed https://popsim-consortium.github.io/stdpopsim-docs/stable/development.html#rebasing but I was going in circles with rebasing and squashing:) I got to this stage. I think the challenge in following the advice the docs (as well as at https://popsim-consortium.github.io/stdpopsim-docs/stable/development.html#when-rebasing-goes-wrong) is that I did not create a branch. Is this why I was going in circles? Below is my log if anyone cares helping me with squashing or we just get these last commits merged in?

> git remote -v
origin	https://github.com/gregorgorjanc/ts_tutorials.git (fetch)
origin	https://github.com/gregorgorjanc/ts_tutorials.git (push)
upstream	https://github.com/tskit-dev/tutorials.git (fetch)
upstream	https://github.com/tskit-dev/tutorials.git (push)
> git fetch upstream
> git log
commit 9f9b7850ffd5378be2b7941194999ed100281a42 (HEAD -> main, origin/main, origin/HEAD)
Author: Gregor Gorjanc <[email protected]>
Date:   Mon Sep 23 07:33:24 2024 +0100

    Minor edits to what_is.md, getting_started.md, and terminology_and_concepts.md

commit 70f1380cda617930ebd79347cf47a26c5646de1b
Author: Gregor Gorjanc <[email protected]>
Date:   Sat Sep 21 09:22:30 2024 +0100

    Minor edits to terminology_and_concepts.md

commit f6dcc9b18878a3f1525ffe16d1407893ec20eaaf
Author: Gregor Gorjanc <[email protected]>
Date:   Fri Sep 20 07:41:36 2024 +0100

    Minor formatting what_is.md

commit a340e5264deaf03a9eb5827ca61d1e894cb40e48 (upstream/main)
Merge: 126cbd5 481bcdc
Author: Yan Wong <[email protected]>
Date:   Fri Sep 20 11:08:15 2024 +0100

    Merge pull request #278 from gregorgorjanc/main

    Minor tweaks to improve flow and clarity

commit 481bcdcf1e4b3291952b8c4b03406753af6ff157
Author: Gregor Gorjanc <[email protected]>
Date:   Thu Sep 19 07:04:51 2024 +0100

    Minor tweaks to improve flow and clarity

commit 126cbd57d84a691f8aa6ac2acdc90fed14e97d33
Merge: 88195b7 88f4a42
Author: Jerome Kelleher <[email protected]>
Date:   Thu Jul 25 14:07:26 2024 +0100

    Merge pull request #274 from hyanwong/arg-wording

    Update terminology to reflect ARG paper
> git rebase -i upstream/main
Successfully rebased and updated refs/heads/main.

Oddly, the opened git-rebase-todo file was empty despite 3 commits since the upstream/main!? Anyway trying to instruct this:

pick 9f9b785 (HEAD -> main, origin/main, origin/HEAD) Minor edits to what_is.md, getting_started.md, and terminology_and_concepts.md
squash 70f1380 Minor edits to terminology_and_concepts.md
squash f6dcc9b Minor formatting what_is.md

I also did not get the commit message change!?, so I did

> git commit --amend -m "Minor edits to what_is.md, getting_started.md, and terminology_and_concepts.md"
[main d62460b] Minor edits to what_is.md, getting_started.md, and terminology_and_concepts.md
 Date: Mon Sep 23 07:33:24 2024 +0100
 1 file changed, 47 insertions(+), 34 deletions(-)
> git log
commit d62460b0405026cd5f1b7f361907809d4e164878 (HEAD -> main)
Author: Gregor Gorjanc <[email protected]>
Date:   Mon Sep 23 07:33:24 2024 +0100

    Minor edits to what_is.md, getting_started.md, and terminology_and_concepts.md

commit 70f1380cda617930ebd79347cf47a26c5646de1b
Author: Gregor Gorjanc <[email protected]>
Date:   Sat Sep 21 09:22:30 2024 +0100

    Minor edits to terminology_and_concepts.md

commit f6dcc9b18878a3f1525ffe16d1407893ec20eaaf
Author: Gregor Gorjanc <[email protected]>
Date:   Fri Sep 20 07:41:36 2024 +0100

    Minor formatting what_is.md

commit a340e5264deaf03a9eb5827ca61d1e894cb40e48 (upstream/main)
Merge: 126cbd5 481bcdc
Author: Yan Wong <[email protected]>
Date:   Fri Sep 20 11:08:15 2024 +0100
...
>

Not sure why the commits are not squashed!?

git rebase --continue
warning: could not read '.git/rebase-merge/head-name': No such file or directory


FFS:(

@jeromekelleher
Copy link
Member

Yes, it's important to use development branches. I've honestly never seen the type of muddle you've gotten into here. My approach to git is to learn a recipe that works, and not worry too much about how it all works behind the scenes. The recipe outlined in the stdpopsim docs should work if you follow it to the letter...

@jeromekelleher
Copy link
Member

What I'd do here:

git checkout -b dev-branch
git rebase -i upstream/main
git push 

then create a new PR from dev-branch. It should squash cleanly

@benjeffery
Copy link
Member

I've done the squash, which you can pull down with git fetch origin && git reset --hard origin/main assuming your fork is origin.
I didn't have any issue, just did git rebase -i main.

@gregorgorjanc
Copy link
Member Author

@jeromekelleher ok, I think it was not-using-a-branch that set me down the wrong path. My fault and lesson learned.

@benjeffery thanks for squashing the commit in the PR - I followed your suggestion on my end as well.

@hyanwong can you review the changes?

Next edits will come from a branch (fingers crossed).

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