Skip to content

Commit 6f2de78

Browse files
author
elvis kahoro
committed
feat: set_upstream_branch: Added a workflow for setting the upstream
branch for a local branch. Also renamed the current workflow for setting upstream to synchronize with upstream since it wasn't actually setting but pushing the local branch to remote
1 parent b412ed4 commit 6f2de78

2 files changed

Lines changed: 20 additions & 3 deletions

File tree

specs/git/set_upstream_branch.yaml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
11
---
22
name: Set upstream branch
3-
command: git push -u origin HEAD
3+
command: git branch --set-upstream-to={{remote}}/{{remote_branch}} {{local_branch}}
4+
arguments:
5+
- name: remote
6+
description: The name of the remote
7+
default_value: origin
8+
- name: remote_branch
9+
description: The name of the remote branch that the local branch should be point to
10+
default_value: main
11+
- name: local_branch
12+
description: The name of the local branch that we want to set
13+
default_value: main
414
tags:
515
- git
6-
description: Sync the local branch to the remote branch with the same name.
7-
arguments: []
16+
description: Sets the upstream for a local branch to a remote branch.
817
shells: []
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
name: Synchronize upstream branch
3+
command: git push -u origin HEAD
4+
tags:
5+
- git
6+
description: Sync the local branch to the remote branch with the same name.
7+
arguments: []
8+
shells: []

0 commit comments

Comments
 (0)