Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
git-tools
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
common-tools
git-tools
Commits
271acf19
Commit
271acf19
authored
Aug 14, 2018
by
huasheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
udpate tools
parent
0861ce09
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
git_merge_branch.sh
git_merge_branch.sh
+6
-0
No files found.
git_merge_branch.sh
View file @
271acf19
...
...
@@ -10,6 +10,12 @@ then
fi
current_branch
=
$(
git branch |
grep
'*'
|
awk
'{print $2}'
)
is_current_branch_in_remote
=
$(
git branch
-r
|
grep
"origin/
$current_branch
"
|
wc
-l
)
if
[
$is_current_branch_in_remote
-eq
0
]
then
git push origin
$current_branch
fi
git pull origin
$current_branch
if
[
$?
-ne
0
]
then
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment