Repository navigation
Conversation
…#452) - resolves issue freeCodeCamp#450 Co-authored-by: northdecoder <[email protected]>
|
@vkWeb I checked out the gh-pages branch again after the merge to see if I could sync up and then branch off the gh-pages. There was a merge conflict on the client/src/modules/dashboard/Events/components/EventItem.tsx file, which was part of a commit to master between the time I opened the PR and the time you closed it. This may have been a one-off thing, but I want to run a test and see. I removed client/src/modules/dashboard/Events/components/EventItem.tsx from the gh-pages branch and created this PR to see what it would look like. I think it would be fine to merge this into the gh-pages branch. My main question is if we'll have to regularly deal with such things when checking out gh-pages for updates. |
|
I suspect gh-pages should operate relatively independent, but when you start switching between master and gh-pages it may cause some new files on master to look like they are deleted. A workaround may be to not mix development of the two branches in the same local directory. The merge conflict I'm seeing is |
|
For instance, I'm wondering if having a separate directory for working on the gh-pages, without master being cloned or pulled, would simplify things and then changes could be made to the local PR branch (ex. fix/gh-pages-test), committed, and pushed to the origin And then do a PR request on Github as normal, targeting the gh-pages branch. |
|
This may not be necessary, but the merge conflict was unexpected, so I'm trying to figure out if we need to avoid potential merge conflicts since switching a single directory between master and gh-pages may cause some unwanted artifacts from the bulk adds and deletes. |
|
@allella umm, I get it. Yeah this happens with git pull very often. Git pull stops whenever it looks like something gonna break (a merge conflict). That's why I always personally use hard reset (like below I've shown) to get in sync with upstream. # We are on master right now. Do git checkout for assurance.
$ git checkout master
# Fetch all resources from upstream
$ git fetch upstream
# Sync local master with upstream (optional step when you only want to work on gh-pages stuff)
$ git reset --hard upstream/master
# We are on master right now. Create and switch to a new branch.
$ git checkout -b gh-pages-fix
# Reset the branch with upstream/gh-pages
$ git reset --hard upstream/gh-pages
# Done. Continue doing your work, follow normal PR creation flow like git add, git commit, git push origin gh-pages-fix.Actually, when we do With git reset --hard, we make our gh-pages-fix branch point to the latest commit where upstream/gh-pages is, then it makes our working directory exactly look like what it was in that latest commit destroying everything else permanently. So, using the commands I listed above should solve all our problems. |
|
And when you want to review PRs, here are the commands I use: https://gist.github.com/vkWeb/dcec82b079f1edc19478ddb58b0ffc5e. It is the simplest and the most elegant way to test PRs locally. It's just two git commands. |
|
Thanks. I'll try the hard-reset. I have an alias that does that on master, but I didn't do it on the gh-pages branch. If for some reason that still comes up with a conflict, then the steps I posted to create a new directory without the master branch checked out seemed to get around the merge conflicts as well. |
|
Thanks @vkWeb. I haven't run through it all the way, but your suggestion makes sense and I've incorporated them into the comment on how to run SchemaSpy. I think creating a directory without master and checking out gh-pages would also work, but it's more steps and things to remember. I'll plan to move the SchemSpy stuff into a more formal doc once it's been validated a couple times. I'll probably be the one running it manually for now. |
|
@allella yes that sounds good. If you run into issues then feel free to mention me anytime! 😄 |

Update README.md).masterbranch of Chapter. This purposely targets the gh-pages branchI'm checking to resolve a merge conflict client/src/modules/dashboard/Events/components/EventItem.tsx when I checked out this branch.
It may have been related to a permissions issue on my end. Or, perhaps it's something we'll have to deal regularly. Trying to figure it out.