0
Good morning, everyone! I was working on a branch and when I ran the checkout for master (git checkout master) it updated without me doing the merge. The following message appears:
abel@abel-Vostro-3500:~/Documentos/Drapp/front-web$ git checkout master
M src/app/pages/painel/doctor/new/new.component.html
M src/app/pages/painel/doctor/new/new.component.ts
M src/environments/environment.ts
Switched to branch 'master'
Your branch is up to date with 'origin/master'.
abel@abel-Vostro-3500:~/Documentos/Drapp/front-web$
Someone knows how to fix this?
What exactly did you want to do?
– hh22
I was working on a branch and had finished what I had to do on it, but I didn’t commit, I immediately ran git checkout master because from master I would create another Feature to do something else. then it appeared in the master
– Sena Oliveira
Have you tried to do the
checkout
to the other branch and commit? master didn’t update itself, you just took the changes to it...– Rafael Tavares
In that case you would have to commit before switching to master or running the correct git stash?
– Sena Oliveira
Yes, I would have to commit... what I recommend is to always check out another branch before starting to develop
– hh22
Right!!! Thank you!
– Sena Oliveira