The development tools What if git code is written in the wrong branch January 26, 2024 by Mr. Jake Anderson No Comments The first step is to temporarily store the modified code into Stash git stash Second, switch to the correct branch Git checkout < branch > The third step is to pull the code changes temporarily from stash. git stash pop