Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [alias]
- # ronto stands for "rebase --onto". Uses the current branch to move it and updates the start-of-the-branch tag along
- ronto = "!f() { \
- git rebase --onto $1 __start__$(git rev-parse --abbrev-ref HEAD) $(git rev-parse --abbrev-ref HEAD); \
- git tag -d __start__$(git rev-parse --abbrev-ref HEAD); \
- git tag __start__$(git rev-parse --abbrev-ref HEAD) $1; \
- }; f"
- # nb stands for "create branch". Creates a tag marking the start-of-the-branch
- cb = "!f() { \
- git tag __start__$1; \
- git checkout -b $1; \
- }; f"
- # db stands for "delete branch". Deletes the tag and the branch itself
- db = "!f() { \
- git tag -d __start__$1; \
- git branch -D $1; \
- }; f"
Add Comment
Please, Sign In to add comment