Skip to content

Conversation

HarrietAkot
Copy link
Contributor

@HarrietAkot HarrietAkot commented Oct 28, 2020

Hello @bsipocz ,
Still in reference to - #1870 .I have combined the changes to each module in to one commit.
Thanks

closes #1872

@bsipocz bsipocz added this to the v0.4.2 milestone Nov 1, 2020
@bsipocz
Copy link
Member

bsipocz commented Nov 1, 2020

@HarrietAkot - this looks OK, but a rebase and squash would be great to 1) remove the merge commit, 2) remove the commit with the change to the bootstrap file and 3) remove the duplicated commit, which is bundled as an external one and thus should not be changed.

Most likely you run into this situation as this has been opened from your master branch, rather than from a feature branch. Nevertheless, it can be fixed for now, for this PR.

To do that, there are some extended docs about it here: https://docs.astropy.org/en/latest/development/workflow/development_workflow.html#rebase-but-only-if-asked

In short:

Make a copy of the branch, just in case something goes wrong you have a version to easily go back to:

git branch copy_master_before_rebase

Currently, you have started off this branch from the commit hashed: 0d57774, so we will treat that as the base (this procedure would be easier if/when working on a feature branch, but for now this is the cleanest way to do this). You need to do "interactive" rebase

git rebase -i 0d57774b257bde4cc37726e4f67678b93c2f306f

It pops up an editor window with the 4 commits in it. Edit these so that only the second and third remains (the first is a duplicate of the second, and the fourth edits the bootstrap file which shouldn't be modified):

pick 65f4e138 Removing object inheritance from astroquery modules
pick ebeb1dd1 Removing object inheritance from query.py

Save the file and exit the editor. The rebase should not run into any conflicts, and you should get a Successfully rebased and updated detached HEAD..

Now, all you need to do is to push it back to your remote. I assume it is named HarrietAkot if you followed the astropy contributing guide, but it may be named origin if you followed other guides. git remote -v should show which one is the case, e.g. for me it's something like:

astropy	[email protected]:astropy/astroquery.git (fetch)
astropy	[email protected]:astropy/astroquery.git (push)
bsipocz	[email protected]:bsipocz/astroquery.git (fetch)
bsipocz	[email protected]:bsipocz/astroquery.git (push)

So, pushing back the branch need to be a --force push, as the rebase changed the history:

git push HarrietAkot HEAD:master --force

@HarrietAkot
Copy link
Contributor Author

HarrietAkot commented Nov 1, 2020 via email

@bsipocz
Copy link
Member

bsipocz commented Nov 1, 2020

Learning the git rebase is a very useful skill, here is my favourite collection of tutorials to practice all kind of scenarios: https://learngitbranching.js.org/

@HarrietAkot
Copy link
Contributor Author

HarrietAkot commented Nov 1, 2020 via email

@HarrietAkot
Copy link
Contributor Author

Hey @bsipocz ,
I have followed through and made updates to my pull request. Kindly review this and give me feedback. Thank you
:)

@bsipocz
Copy link
Member

bsipocz commented Nov 3, 2020

Thank you @HarrietAkot, this all looks good now.

You have very nicely resolved the issues that came up during the rebase as well.

@bsipocz bsipocz merged commit afec717 into astropy:master Nov 3, 2020
@HarrietAkot
Copy link
Contributor Author

Thank you 😊

@eerovaher eerovaher mentioned this pull request Oct 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants