Deze pagina is nog niet beschikbaar in uw eigen taal. We werken er hard aan om meer taalversies toe te voegen. Bedankt voor uw steun.
- Service Overview
- Getting Started
-
User Guide
- Overview
- Git Installation and Configuration
- Setting SSH Key or HTTPS Password for CodeArts Repo Repository
- Migrating Data to CodeArts Repo
- Creating a CodeArts Repo Repository
- Associating the CodeArts Repo Repository
- Cloning or Downloading Code from CodeArts Repo to a Local PC
- Using CodeArts Repo
- Configuring CodeArts Repo
- Submitting Code to the CodeArts Repo
- More About Git
- Best Practices
-
API Reference
- Before You Start
- API Overview
- Calling APIs
-
APIs
- SSHKey
-
Repository
- Obtain files in the branch directory.
- Obtaining Warehouse Statistics
- Obtains image files of a specific branch in a repository.
- Modifying the Status of a Repository Referenced by a Pipeline
- Checks whether a user has the warehouse administrator permission.
- Sets whether a repository is in public or private state.
- Obtains the content of a specified file in a specified branch of a repository.
- Obtaining the List of Public Sample Templates
- Creating a repository
- Obtain the short ID of the repository based on the repository name and group name to combine the short ID with the URL of the submission details page corresponding to commitid.
- Queries the submission of a branch of a repository based on the group name and repository name.
- Querying the Branch of a Warehouse
- This API is used to query the submission of a branch of a warehouse based on the warehouse ID. More optional parameters are provided.
- Adding a Deployment Key
- Deleting a Repository Deployment Key
- Obtains the last submission statistics of the warehouse.
- Repository Statistics
- Delete repositories
- Check the repository creation status.
- Querying the Tag List of a Warehouse
- Adding a Tag
- Querying the Details of a Warehouse
- Obtains the number of submitted code lines.
- Download Repository
- Creating a Protection Branch
- Obtaining the Repository Branch List
- Obtaining the List of Warehouse Combination Requests
- Obtaining Warehouse Combination Request Details
- V2Project
- RepoMember
- Commit
- File
- User
- WebHook
- Project
- V2 Warehouse Management
- Discussion
- Application Examples
- Appendix
-
FAQs
-
Managing Repositories
- How Can I Set Multiple SSH Keys on My Computer?
- How Can I Prevent Unauthorized Code Replication?
- How Do I Upgrade TLS?
- Should I Set a Public SSH Key for Each Repository?
- Can All Users Upload and Download Code with the Same SSH Key?
- Will the System Remove Deleted Project Members from Repositories and SSH Keys Created by Them?
- How Can I Make a Repository Private or Public?
- SSH Function Upgraded
- Using Repositories
- Migrating Repositories
-
FAQs
- Why Can't I View Repositories Created by Other Project Members?
- Is There Any File Size Limit in Repositories?
- Can I Export the Statistics on Code Lines Committed by Members?
- How Do I Prevent Files Containing Secrets from Being Pushed to a Repository?
- Why Can't I See the Repository Synchronization Tab?
- Will Related Git Code Branches Be Automatically Deleted When the Creator of a Git Branch Is Deleted?
- What Do I Do If a Binary File Fails to Be Pushed to CodeArts Repo?
-
Git Issues
- How Does Git Identify Repository Administrators?
- How Do I Obtain the Path Where Downloaded Code Is Stored?
- How Do I Obtain the Code Repository Address?
- What Are Repository URLs Used for?
- Does CodeArts Repo Support SVN?
- Can I Decompress a Compressed Package Uploaded to a Cloud Repository?
- How Do I Clear, Save, and Change the Username and Password in Git?
-
Troubleshooting
- Private Key Is Lost
- SSH Key Already Exits
- Git Keeps Asking for Passphrase During Code Clone via SSH
- Password Incorrect During Code Clone via HTTPS
- Committed Files Cannot Be Found in the Cloud Repository
- Message "pathspec XXX did not match any files" Is Displayed
- Message "Transport Error: cannot get remote repository refs. XXX.git: cannot open git-upload-pack" Is Displayed
- Message "syntax error near unexpected token `newline'" Is Displayed
- Message "unable to auto-detect email address" Is Displayed
- Message "fatal:Authentication failed" Is Displayed
- Message "'origin' does not appear to be a git repository" Is Displayed
- Message "You are not allowed to push code to protected branches on this project" is Displayed
- Message "Not a git repository" Is Displayed
- Message "src refspec master does not match any" Is Displayed
- Message "destination path 'XXX' already exists and is not an empty directory" Is Displayed
- Message "The requested URL returned error: 401" Is Displayed
- Code Push Fails
- Code Pull Fails
- Message "fatal: refusing to merge unrelated histories" Is Displayed
- Message "SSL certificate problem" Is Displayed
-
Managing Repositories
How Do I Modify a Historical Commit Message?
Symptom
The commit message of a local commit is incorrect. The following error information is displayed:
Analysis
The error message "message of commit" is displayed, followed by a string of 40 characters consisting of digits and lowercase letters. This character string indicates that the commit message is incorrect.
The commit ID 1fbd34f77d1ddb73b73b84b878fd9edbece711f5 is incorrect. The commit message does not match the regular-expression: ^\[maven-release-plugin\]|[Trouble ticket number or requirement ticket number]\s*.+\W[Modified description]\s*.+\W[Modified reason]\s*.+\W[Modules] \s*.+\W[Modifier]\s*.+\W[Approver]\s*.+
Solution
- To modify the latest incorrect commit record, perform the following operations.
- In the root directory of the local code workspace, that is, the level where the .git hidden folder exists, right-click and choose git bash here from the shortcut menu.
- Run the following command to query the latest commit record.
git log
- Run the following command to open the vi text editor.
git commit --amend
- Enter git commit --amend -m ', enter the information in the first line, and press Enter. Enter the information in the second line, and repeat the process to the last line. Add the other single quotation mark at the end of the last line, and press Enter. The modification is successful.
- To modify a commit record that is not the latest one, perform the following operations.
- Run the following command on the git bash to search for incorrect commit records.
git log
- Run the following command to roll back to the previous commit record.
git reset --hard commitID
For example, run the following command.
git reset --hard 1fbd34f77d1ddb73b73b84b878fd9edbece711f5
- Modify the previous commit record by referring to 2 or 3, and then press Enter to save the modification.
- Find your commit record and run cherry-pick.
NOTE:
If the commit message belongs to you and you have not performed a merge operation, you can perform cherry-pick.
As shown in the following figure, the commit message in the green box can be cherry-picked, and that in the red box cannot.
- Run the following command to select a branch.
git cherry-pick commitID
For example, the commitID is 62c6ac5bab09bb450007bb9996177ee711c7e2fb.
git cherry-pick 62c6ac5bab09bb450007bb9996177ee711c7e2fb
NOTE:
- If the incorrect commit message has been merged into a repository, you need to run the git push -f command to forcibly push the new one.
- If the commit fails, run the git push command to push the new one.
- If the error is caused by someone else and the commit has been merged into a repository, no further modification is required. You can directly delete the commit rules of the repository and push the new commit message to the repository by running the git push command.
- Run the following command on the git bash to search for incorrect commit records.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.