Skip to content

Latest commit

 

History

History
28 lines (19 loc) · 494 Bytes

index.md

File metadata and controls

28 lines (19 loc) · 494 Bytes

git topic-move

Rename the current topic branch

Git alias:

topic-move = "!f(){ \
    new_branch=\"$1\"; \
    old_branch=$(git current-branch); \
    git branch --move \"$old_branch\" \"$new_branch\"; \
    git push origin \":$old_branch\" \"$new_branch\"; \
};f"

Example:

git topic-move foo

Customize this alias as you like for your own workflow.

Our workflow does these steps:

  1. Move the local branch.

  2. Move the remote branch by pushing to origin.