The tools hidden by programmers can easily realize project development. A command initiates Merge Request project code submission and consolidation, and the Code View reviewer can be specified.
In the development of the latest git project, the merge request tool is launched with one click to automatically identify the local environment. It supports windows, Linux and Mac, including tutorials and materials.
Very simple to use. After downloading the script, simply configure it according to the tutorial, and select the annotation part according to your own operating system type.
There are some tutorials on the Internet, but they are not really used. Now, git warehouse cloning development is divided into two ways, git: / / and https: / /. Many only consider git.
After actual measurement, this script fully supports git warehouse. No matter what kind of code cloning method it supports, it automatically obtains the commit message as the merge request information.
Enter the project root directory managed by Git and execute the following command to initiate a merge request. By default, the request is merged into the test branch, - A is used to specify the audit delegate,
Execute merge is equivalent to merge test or other remote branch names. The specific usage is as follows:
merge test
merge test -a frank
merge
merge -a frank
Ability to provide:
Create merge request
Automatically identify warehouse / item name and ID
The current local branch is used as the source branch
Manually enter the remote branch name as the target branch. The default is test branch
Use last commit as the merge title
Provides the optional function of specifying a delegate
Optional Accept merge request function is provided
#!/bin/bash # how to use ? # For windows: open cygwin terminal and execute vim Bashrc, type: alias merge='bash merge file path / merge SH ', save and exit, and then execute: source bashrc # For Mac or Linux: open the command line terminal and execute VIM ~ / bash_ Profile, type: alias merge="sh /merge file path / merge.sh", save and exit, and then execute: source ~ / bash_ profile # Enter the project root directory managed by Git and execute the following command to initiate a merge request. By default, the request is merged into the test branch, - A is used to specify the audit delegate, # Execute merge is equivalent to merge test or other remote branch names. The specific usage is as follows: # merge test # merge test -a frank # merge # merge -a frank # Ability to provide: # Create merge request # Automatically identify warehouse / item name and ID # The current local branch is used as the source branch # Manually enter the remote branch name as the target branch. The default is test branch # Use last commit as the merge title # Provides the optional function of specifying a delegate # Optional Accept merge request function is provided # other: # reference material: https://github.com/YouAreOnlyOne/gitlabhq/blob/master/doc/api/merge_requests.md # More options: https://blog.csdn.net/u014374009?type=blog # Wait for you to contact # Windows installation cygwin: # Download and install Cygwin and go to Cygwin's official website http://www.cygwin.com/ , window 64 bit, please select setup-x86_64.exe 32-bit, please select setup-x86.exe exe # When the download is complete, run setup Exe program. # reference material: https://blog.csdn.net/qq_36135335/article/details/83306120 # ==========================================Where the equal sign package needs to be modified ======================================== start========================= # Get method: #Log in to the Gitlab server of the project #Click the login account and click [settings] #Click Access Tokens # All options under Scope can be checked # Click Create Personal Access Token and copy it here PRIVATE_TOKEN='xxxxxxxxxxxxxxxxxxxxxxxxxxx' GITLAB_URL='gitlab Warehouse domain name or IP,Don't add after the domain name / ,such as http://192.168.8.258' ## Windows enables the following comments (one of two) # RED_COLOR='\e[31m' # BLUE_COLOR='\e[34m' # END_COLOR='\e[0m' ## Mac or Linux enables the following comments (one of two) RED_COLOR='\033[31m' BLUE_COLOR='\033[34m' END_COLOR='\033[0m' # ==========================================Where the equal sign package needs to be modified ====================================== end=========================
If you can't download, you can scan the QR code in the link below and leave the email:
Scan email
After the complete script is downloaded and placed directly under a file directory, it can be used through the following simple configuration path:
For windows: open cygwin terminal and execute vim Bashrc, type: alias merge = 'path to bash merge file / merge SH ', save and exit, and then execute: source bashrc
For Mac or Linux: open the command line terminal and execute VIM ~ / bash_ Profile, type: alias merge = "sh /merge file path / merge.sh", save and exit, and then execute: source ~ / bash_ profile
Enter the project root directory of Git clone to start using. The following is a complete example:
After modifying the code:
git commit -m "added xxx function"
Submit code to your own branch:
git push
Merge to test branch or master branch:
merge test
If you want to be simpler, you can pull request in the following way:
git commit -m "modified xxx module" & & git push & & Merge
You can submit the code and initiate the code merging into the test branch.
Any questions can be left a message.
More services can be sent by private mail.
I don't know how to use the message.