- Create a new local branch starting from the HEAD of my current working branch.
- Immediately push it upstream to the remote origin so that it exists in both places.
- Set the local branch to track the remote branch.
- Commit/push/repeat
- Merge the branch back into master (or wherever it started from)
- Delete the local branch.
- Push to delete the remote branch.
- git branch-create feature_branch
- Commit/push/repeat.
- Merge branch back into parent branch.
- git branch-delete feature_branch
To use these scripts via the above commands, download the scripts above and place them somewhere in your path. I even created short aliases for them like so:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias gbc='git branch-create' | |
alias gbd='git branch-delete' |
No comments:
Post a Comment