Supposing you're currently working on something experimental on branch "dev" that you are not sure about, you may perform your commits on another branch:
Steps:
- Create a new branch "dev-temp"
- Checkout the new branch
- Commit your code to "dev-temp"and continue to do so until you're done
- After you are done, and if you want to merge your changes:
- Switch to "dev"
- Merge your changes from "dev-temp" to "dev"
- Delete temporary branch "dev-temp" with "git branch -d dev-temp"
- And if you've never pushed "dev-temp", then you don't have to worry about having to do it. It's your local temporary branch after all.
No comments:
Post a Comment