Note:
All development work should be performed in the local branch. Switch the main code of the branch synchronization before submission.
Requirement: After modifying a problem ticket, submit the ticket to your local computer and upload the code. Follow the code operation procedure described below.
[]: Indicates an optional parameter. It is best to include a parameter, which is used by warehouse.
Projectname; peojectname value contained in the remote tag in the. Git/config file in the GIT Library
Common git commands are as follows:
Main synchronization code: repo sync [projectname]
Create a local branch: git checkout-B branchname
Switch branch: git checkout branchname
Merge major branch updates to local development: git rebase remote branchname
Add and modify to cache: git add [-A] [filepath...]
Submit the modification to the local database: git commit
Submit the modification to the latest version: git commit -- Amend
Undo modification: git checkout filepath
Delete added: Use git RM filepath with caution. It is not recommended unless you have.
View submission records: git log [-- oneline]
Upload the local file to the master: repo upload [projectname]
Correct code operation process:
1. Get the latest code:
Git checkout remote
Repo sync
Git rebase remote branchname
If (conflict ){
Resolve Conflicts
Git add
Git rebase -- continue
}
2. Development:
Code Development
Git add
Git commit
3. Upload and submit:
Git checkout remote
Repo sync
Git rebase remote branchname
If (conflict ){
Resolve Conflicts
Git add
Git rebase -- continue
}
Git rebase branchname remote
Repo upload projectname