Open warnerjc opened 4 years ago
Thank you for this comment. I hope the Carbon-Angular team fixes this issue soon.
@warnerjc , I followed your suggestion and could push my changes. However, now on Step 2 the command git checkout -b angular-step-2 upstream/angular-step-2
throws the following errors:
karma.conf.js: needs merge
package-lock.json: needs merge
package.json: needs merge
src/app/app-routing.module.ts: needs merge
src/app/app.module.ts: needs merge
src/app/header/header.component.html: needs merge
src/styles.scss: needs merge
error: you need to resolve your current index first
Would you know how to resolve this too? Since at the end of Step 1 it was mentioned that they won't merge.
@pooshonbanerjee git checkout -b angular-step-2 upstream/angular-step-2
wants to create a new local branch, but your current branch has un-staged commits.
You don't necessarily need those changes, since the tutorial will start you off with all the correct files when creating the new local branch.
In that case, you can do one of several things:
git add -A
, commit all the changes using git commit -m 'resolve merge conflict'
, and push those changes to your Stage 1 GitHub branch git push origin <my-stage-1-branch>
. Then use git checkout -b angular-step-2 upstream/angular-step-2
to create your new local branch.git reset --merge
and then use git checkout -b angular-step-2 upstream/angular-step-2
to create your new local branch`.git reset HEAD <my-stage-1-branch>
and then use git checkout -b angular-step-2 upstream/angular-step-2
to create your new local branch`.StackOverflow with more explanation on these:
https://stackoverflow.com/questions/6002732/why-can-i-not-switch-branches/31697708
Thanks @warnerjc , I will try one of these steps. What I am worried about though is my previous push for Step 1 is still open, probably because of the merge conflicts, and if it stays that way, it may not count towards the completion of this training program. So I am thinking of doing it all over again, what do you suggest? And please accept my apologies if I am dragging you unnecessarily into something which I am supposed to figure out on my own.
The solution for resolving the
non-fast-forward
error in Carbon Tutorial Angular Step 1 is incorrect or misleading.The user must
git push origin angular-step-1 --force
, other wise following thegit pull upstream angular-step-1
will delete all files in your localangular-step-1
branch and leave you in aangular-step-1|MERGE
(resolve conflict) state that contains no conflicts to resolve.