generated from skills/template-template
-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Create a script to merge branches Run the script to avoid conflicts * Correct the script path * Delete the instruction to resolve conflicts Now the conflicts are avoided!
- Loading branch information
1 parent
0471289
commit 420fa7a
Showing
3 changed files
with
27 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/env bash | ||
# Make sure this file is executable | ||
# chmod +x .github/script/merge-branch.sh | ||
|
||
# USAGE: This script is used to merge a branch into another branch | ||
|
||
# BACKGROUND: This operation is required to avoid conflicts between branches. | ||
|
||
# Setup commiter identity | ||
git config user.name github-actions | ||
git config user.email [email protected] | ||
|
||
# Merge branch | ||
echo "If branch $branch2 exists, merge branch origin $branch1 into branch $branch2" | ||
if git show-ref --quiet refs/heads/$branch2 | ||
then | ||
git checkout $branch2 | ||
git merge origin $branch1 | ||
git push origin $branch2 | ||
else | ||
echo "Branch $branch2 does not exist" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I forgot the token.