Skip to content

GitSync

Damian edited this page Apr 3, 2020 · 2 revisions

Merges your current branch with another branch.

As a general rule of thumb, always sync up your branch with develop prior to the Pull Request. So we converted 4 commands into one so you no longer have to keep typing nonsense.

Xeno-DevOps Solution

[feature/MyBranch]> GitSync
Sync complete!

Old Stinky Method

[feature-MyBranch]> git checkout develop
[develop]> git pull
[develop]> git checkout feature-MyBranch
[feature-MyBranch]> git merge develop

Use Case Examples

Use wants to sync their current branch with...

The (default) develop branch

[feature/MyBranch]> GitSync

Sync with develop and push

[feature/MyBranch]> GitSync -p

Another branch in the same repository

Merge strategy: feature/MyBranch << feature/TeammateBranch

[feature/MyBranch]> GitSync -syncBranch "feature/TeammateBranch"

Sync Across Remotes

Let's say your friend's branch is on GitLab but not GitHub and you need it merged into yours.

[feature/MyBranch]> GitSync -remote "gitlab" - syncBranch "feature/FriendsBranch"

Boom! Synced ;)