This has been driving me crazy, and I'm not sure how to approach it without creating an entirely different repository. I have a live website on branchA
using master
branch, and I want to completely rewrite the website, thus I want to push the new code onto branchB
. Here are the steps I do:
git checkout -b branchB
git add -u
git commit -m "Why isn't this working"
git push origin branchB
And God knows why, it keeps adding these local files that I don't want into the commit and now I have these irrelevant files in my branch. I tried to git add
each individual files in that folder too.
Can someone walk me through this? I've been on this for two nights now.