Skip to content

Conversation

@kazumikerr
Copy link
Contributor

@kazumikerr kazumikerr commented Jan 5, 2023

Description

Added a new term Drop Table for SQL documentation #1424

Type of Change

  • Adding a new entry

Checklist

  • All writings are my own.
  • My entry follows the Codecademy Docs style guide.
  • My changes generate no new warnings.
  • I have performed a self-review of my own writing and code.
  • I have checked my entry and corrected any misspellings.
  • I have made corresponding changes to the documentation if needed.
  • I have confirmed my changes are not being pushed from my forked main branch.
  • I have confirmed that I'm pushing from a new branch named after the changes I'm making.
  • Under "Development" on the right, I have linked any issues that are relevant to this PR (write "Closes # in the "Description" above).

@CLAassistant
Copy link

CLAassistant commented Jan 5, 2023

CLA assistant check
All committers have signed the CLA.

@kazumikerr kazumikerr changed the title [New Term] SQL: Drop Table #1424 [New Term] SQL: Drop Table Jan 5, 2023
@SSwiniarski SSwiniarski linked an issue Jan 5, 2023 that may be closed by this pull request
3 tasks
@SSwiniarski SSwiniarski added sql SQL entries new entry New entry or entries status: under review Issue or PR is currently being reviewed labels Jan 5, 2023
@SSwiniarski SSwiniarski self-assigned this Jan 5, 2023
@SSwiniarski
Copy link
Contributor

@kazumikerr I'll be doing a first review on this. Please remember to sign the CLA

Copy link
Contributor

@SSwiniarski SSwiniarski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kazumikerr I did a first review and left you a couple of comments.

@kazumikerr
Copy link
Contributor Author

@SSwiniarski I tried to run git push origin drop-table-branch and getting errors:

! [rejected] drop-table-branch -> drop-table-branch (non-fast-forward)
error: failed to push some refs to 'https://github.com/kazumikerr/docs.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

I also ran git rebase main and response was

Current branch drop-table-branch is up to date.

Could you please help me when you have a chance? Thank you.

@SSwiniarski
Copy link
Contributor

@Dusch4593, any ideas on @kazumikerr's problem?

@Dusch4593
Copy link
Contributor

Dusch4593 commented Jan 6, 2023

@Dusch4593, any ideas on @kazumikerr's problem?

@kazumikerr From what I can tell, your remote's main branch is 1 commit behind the upstream Codecademy/docs:main base branch. Here's what I'd recommend for this:

  1. Catch your origin/main branch up with Codecademy/docs:main on GitHub:

Screen Shot 2023-01-06 at 5 53 25 PM

  1. On your terminal, switch to your local main branch by running git checkout main
  2. Run git pull to sync your local main with your remote origin/main
  3. Switch back into this PR branch with git checkout drop-table-branch and run git pull again
  • If this takes you to a weird Vim-like screen on your terminal, you can exit it by typing :wq and pressing Enter
  1. add/commit/push your changes like normal.

Hope this helps and let me know if you have any questions or run into any issues. 😄

cc: @SSwiniarski

@kazumikerr
Copy link
Contributor Author

Thank you for your detailed explanations @Dusch4593 .

I followed your instructions and it was working fine until the step 5 git pull.

There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.

git pull <remote> <branch>

If you wish to set tracking information for this branch you can do so with:

git branch --set-upstream-to=<remote>/<branch> drop-table-branch

At step 6, commit command's response was:

On branch drop-table-branch
nothing to commit, working tree clean

git push origin drop-table-branch command's response was:

! [rejected] drop-table-branch -> drop-table-branch (non-fast-forward)
error: failed to push some refs to 'https://github.com/kazumikerr/docs.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

How would you suggest we proceed?

@Dusch4593
Copy link
Contributor

@kazumikerr Ah gotcha.

For step 5, try running with git pull origin main, instead. Then move to step 6 to see the push will work.

Hope this helps 😄

@kazumikerr
Copy link
Contributor Author

Thank you, @Dusch4593.

After running the git pull origin main, I'm getting this message:

branch main -> FETCH_HEAD
hint: You have divergent branches and need to specify how to reconcile them.
hint: You can do so by running one of the following commands sometime before
hint: your next pull:
hint:
hint: git config pull.rebase false # merge
hint: git config pull.rebase true # rebase
hint: git config pull.ff only # fast-forward only
hint:
hint: You can replace "git config" with "git config --global" to set a default
hint: preference for all repositories. You can also pass --rebase, --no-rebase,
hint: or --ff-only on the command line to override the configured default per
hint: invocation.
fatal: Need to specify how to reconcile divergent branches.

I read this stack overflow post, but I was not sure how to proceed with this. Could you please help me when you have a chance? Thank you.

Copy link
Contributor

@SSwiniarski SSwiniarski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kazumikerr Looks good for a second review.

@kazumikerr
Copy link
Contributor Author

@Dusch4593
I'm not exactly sure how, but I think I could successfully push the drop-table-branch.

I ran following commands:
git pull origin drop-table-branch --rebase

warning: skipped previously applied commit 86a657b7
hint: use --reapply-cherry-picks to include skipped commits
hint: Disable this message with "git config advice.skippedCherryPicks false"
Successfully rebased and updated refs/heads/drop-table-branch.

git push origin drop-table-branch

@kazumikerr
Copy link
Contributor Author

@SSwiniarski
Thank you for reviewing so quickly! Is there anything I should do next?

@SSwiniarski
Copy link
Contributor

@kazumikerr You don't need to do anything until another maintainer comes and does a second review.

@Dusch4593 Dusch4593 self-requested a review January 9, 2023 19:33
@Dusch4593 Dusch4593 self-assigned this Jan 9, 2023
@kazumikerr
Copy link
Contributor Author

@SSwiniarski @Dusch4593
Is there anything I should do at this moment?

Copy link
Contributor

@Dusch4593 Dusch4593 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @kazumikerr! 👋🏻 I just had one point of feedback and then this should be good to merge afterward. 😄

- 'paths/analyze-data-with-sql'
---

The **`DROP TABLE`** command deletes an existing table in a database.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The **`DROP TABLE`** command deletes an existing table in a database.
The **`DROP TABLE`** command deletes an existing table in a [database](https://www.codecademy.com/resources/docs/general/database).

@kazumikerr
Copy link
Contributor Author

@Dusch4593
Thank you for your feedback! I just updated the drop-table.md.

Copy link
Contributor

@Dusch4593 Dusch4593 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍🏻 Thanks @kazumikerr!

@Dusch4593 Dusch4593 merged commit cd0ed49 into Codecademy:main Jan 11, 2023
@github-actions
Copy link

👋 @kazumikerr
You have contributed to Codecademy Docs, and we would like to know more about you and your experience.
Please take a minute to fill out this four question survey to help us better understand Docs contributions and how we can improve the experience for you and our learners.
Thank you for your help!

@kazumikerr kazumikerr deleted the drop-table-branch branch January 11, 2023 16:29
@Dusch4593
Copy link
Contributor

Dusch4593 commented Jan 11, 2023

Congrats and thank you for contributing to Codecademy Docs, @kazumikerr! 🎊 🥳

The entry should now be live: https://www.codecademy.com/resources/docs/sql/commands/drop-table

Currently, your profile is anonymously listed on the entry page. To make it visible, you'll need to add your GitHub username to your Codecademy profile, log out of Codecademy, and log back in with your GitHub account:

Screen Shot 2023-01-11 at 11 33 06 AM

Looking forward to your next Docs contribution! 😄

@kazumikerr
Copy link
Contributor Author

Thank you so much @Dusch4593 !
It was pleasure working with you.
I will definitely try to contribute more codecademy docs.

@kazumikerr
Copy link
Contributor Author

@Dusch4593
Sorry to bother you. I added my github account on my codecademy profile, logged out, and logged back in to the codecademy using github. However, it created a new account and the codecademy doc contributor icon was not updated. Do you know what I'm doing wrong?

@Dusch4593
Copy link
Contributor

Dusch4593 commented Jan 11, 2023

@Dusch4593

Sorry to bother you. I added my github account on my codecademy profile, logged out, and logged back in to the codecademy using github. However, it created a new account and the codecademy doc contributor icon was not updated. Do you know what I'm doing wrong?

Oh that's weird. Can you provide me links to both Codecademy profiles, if possible?

@kazumikerr
Copy link
Contributor Author

@Dusch4593
This is the main codecademy account: https://www.codecademy.com/profiles/kazumi_kerr
This is the one just created using github: https://www.codecademy.com/profiles/ruby0670160139
Thank you for your help.

@Dusch4593
Copy link
Contributor

Thanks @kazumikerr! If you don't mind, I'm gonna confer with my colleagues and share these links to learn of what's causing this and come up with how to go forward.

@kazumikerr
Copy link
Contributor Author

Yes, please. Thank you again!

@Dusch4593
Copy link
Contributor

@kazumikerr quick question: Is the email the same for (a) your Codecademy profile, (b) the new, weird Codecademy profile, and (c) your GitHub account?

@kazumikerr
Copy link
Contributor Author

@Dusch4593
(a) Codecademy profile is using a different email address
(b) the new, weird Codecademy profile and (c) GitHub account are using the same email address

@Dusch4593
Copy link
Contributor

@kazumikerr Thank you! I'm going to pass this info along to our engineers/customer service folks to investigate what might be going on.

@kazumikerr
Copy link
Contributor Author

@Dusch4593

Sorry for bothering you again.
It seems like the anonymous icon was updated to the weird ruby0670160139 icon.

image

Would it be possible to link the codecademy docs to this account instead: https://www.codecademy.com/profiles/kazumi_kerr
image

If not possible, I just renamed the username from ruby0670160139 to kazumikerr. But it still shows a weird ruby0670160139 icon. https://www.codecademy.com/profiles/kazumikerr
image

@Dusch4593
Copy link
Contributor

cc: @awgraves Any thoughts on this? Is this just a matter of @kazumikerr assigning a consistent email between their GitHub and (two) Codecademy accounts?

@awgraves
Copy link
Contributor

Hi @kazumikerr sorry about the trouble here - I went ahead and manually linked this for you.
Live doc
Screen Shot 2023-01-12 at 4 14 58 PM

That second account that was created has also been removed now as well.

@kazumikerr
Copy link
Contributor Author

Thank you so much for your help @awgraves @Dusch4593 !
Confirmed the changes you made for linking the codecademy doc with the correct account and removing the second account.

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.

[Entry] SQL: Drop Table

5 participants