Git submission specification
The following is the git code submission specification:
Clone the project:
Git clone git@YourIp:ProjectName.git
Pull submission process (the main branch is pulled to local development):
Git pull git@YourIp:ProjectName.git develop:develop (must be the first step)
Git checkout-bJIRA_NAME develop (local development branch name) writes and modifies the code and compiles successfully
Git status
Git add.
Git status (can be omitted)
Git commit-m "[modify] TASK_NAME modify customer's login permissions" (submit code format)
Git checkout develop
Git pull git@YourIp:ProjectName.git develop:develop (must have)
Git merge-no-ffJIRA_NAME
Git push git@YourIp:ProjectName.git develop:develop
Git fetch (optional)
Git branch-d JIRA_NAME (required)
Pull the remote branch to the local development:
Git checkout develop2 [remote branch name]
Git pull git@10.5.2.121:MFR/hybris5511.gitdevelop2:develop2
Git checkout-bJIRA_NAMEdevelop2 [remote branch name]
Git commit-m "[modify] TASK_NAME modifies the login logic of remote branch customers"
Git checkout develop2 [remote branch name]
Git pull git@10.5.2.121:MFR/hybris5511.gitdevelop2: develop2
Git merge-no-ffJIRA_NAME
Git push git@10.5.2.121:MFR/hybris5511.gitdevelop2: develop2
Special instructions:
Git single submission cannot be larger than 100m. Otherwise, Push rejected: d:\ MavenSpace\ thinkinjava: push master to origin/master was rejected by remote
Withdraw the version number:
Git reset-hard ab868a89
Git reset-hard 99e8a874
Git reset-hard c0f125bd02c8c84ea2de2dfb4d408b8f54b3b8c1
Local warehouse withdraws to temporary storage area:
Git reset HEAD~1 [withdraw one version]
Git reset HEAD~2 [withdraw two versions]
Need to re-Commit.
Set the git log format and find the JIRA task:
Git config-- global alias.lg50 "log-50-- graph-- pretty=format:'%Cred%h%Creset -% C (yellow)% d%Creset% s% Cgreen (% cr)% Creset'-- abbrev-commit-- date=relative"
Git lg50-grep= SIRBYH-8888