git sync alias
A Git alias for enhanced sync functionality with basic automatic conflict resolution.
About
When working with multiple branches, making things be synchronized can be annoying in fast paced teams, so I've created this alias to help me with that. Here's some basic usage:
git sync # Basic rebase (current branch)
git sync feature-branch # Basic rebase (specific branch)
git sync -f # Force reset
git sync -f feature-branch # Force reset (specific branch)
git sync -r upstream # Different remote
git sync -t # Auto-resolve conflicts favoring their changes
git sync -o # Auto-resolve conflicts favoring our changes
# you can run the commands below without having to abort the conflict, the sync does it for you
git sync -t feature-branch # Auto-resolve conflicts favoring their changes (specific branch)
git sync -o feature-branch # Auto-resolve conflicts favoring our changes (specific branch)