Answer the question
In order to leave comments, you need to log in
By force to move to another branch without commits?
There is a master branch and a dev branch. Subdomain created, sudo cp -R mainDomainFolder testDomainFolder.
Now, when you try to switch to the dev branch from testDomainFolder, it gives an error that you need to do a stash or a commit, but you don’t need to do any of this, I want to do a hard reset. Take it, go to the dev branch in the testDomainFolder folder, and download all the files new from the dev branch.
How to switch to a new branch and take all the files from there without commits and other things?
If the files in the folder are lost, it's okay.
Of course, you can clone the dev branch over a new one into a clean folder.
Answer the question
In order to leave comments, you need to log in
Why doesn't hard reset work? especially
If the files in the folder are lost, it's okay.
cd testDomainFolder
git reset --hard
git fetch --all
git checkout -f master # если нам надо в мастере
#так же можно сбросить локальное состояние
git checkout -- ./
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question