DEV Community

Discussion on: The most important git practice

Collapse
 
slavius profile image
Slavius • Edited

Even if your master/main branch has commits not pushed to remote(s) and also unstaged changes it's easy to do git stash followed by git branch hotfix/urgent-task origin/master which would create a new branch from origin/master commit without your changes. Git has solution for everything and this one has exactly the same amount of steps you'd need if you were working on another change in another branch.

Collapse
 
sandordargo profile image
Sandor Dargo

That's a good piece of advice, thanks!