E
E
ettaluni2021-07-07 09:58:56
git
ettaluni, 2021-07-07 09:58:56

Why not go to the master?

Good day! I incorrectly named the branch, and indeed made a branch from the branch in general. Trying to revert back to git checkout master. Throws an error: Your local changes to the specified files will be overwritten when you switch to the [ File List ] state.
My vektka is already filled with prod. What should be done to return to the master, and probably update everything to the current state?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mikhail Prokhorov, 2021-07-07
@ettaluni

Apparently you have uncommitted changes in the current branch. If you don't need them:

git stash
git stash clear
git checkout master

If the changes still contain something important and you may use them in another branch:
git stash
git checkout master
git stash apply [email protected]{0}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question