Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
CamiTK
Docs
Commits
106a2d8e
Commit
106a2d8e
authored
Nov 05, 2019
by
Emmanuel Promayon
Browse files
Update Git_Bash_Helper_Scripts.md
parent
f3d0136e
Pipeline
#31637
passed with stages
in 45 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
docs/Getting Started/Examples and Tutorials/Git_Bash_Helper_Scripts.md
View file @
106a2d8e
...
...
@@ -112,14 +112,16 @@ fi
#!/bin/bash
#
# qgit name "&Push and Create Merge Request"
#
# name of the current branch
currentBranch
=
$(
git rev-parse
--abbrev-ref
HEAD
)
# push
# As git push prints to stderr, redirect stderr to stdout
pushmsg
=
$(
git push 2>&1
)
pushmsg
=
$(
git push
--set-upstream
origin
$currentBranch
2>&1
)
# setup upstream for local branch (if someone else modify the current
# branch, then "git pull" will be configured to get this modification
currentBranch
=
$(
git rev-parse
--abbrev-ref
HEAD
)
git branch
--set-upstream-to
=
origin/
$currentBranch
$currentBranch
url
=
$(
echo
"
$pushmsg
"
|
grep
https |
cut
-c11-
)
...
...
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