How to upload local code folder to Qizhi platform warehouse through Git command

Create a local folder with the same name as the Qizhi platform warehouse
Insert image description here
Then right-click on the local folder –>Select Git Bash Here, the Git command window will open a>

Initialize local warehouse

git init

Add project files to Git

git add .

Commit your changes: Use the following command to commit your changes and add a descriptive message to the commit:

git commit -m "Initial commit"

The following error was reported
Insert image description here
Here you need to initialize your name and email address

Associate the remote repository: Use the following command to associate the local repository with the remote repository. Replace with the URL of the warehouse you created on the Qizhi AI collaboration platform:

git remote add origin <remote-repo-url>

Push to remote repository: Use the following command to push local changes to the remote repository:

git push -u origin master

Enter your username and password: Git Bash may prompt you to enter your Qizhi AI collaboration platform username and password to verify your identity.

Use the following command on the command line to perform a force push. Note that this will overwrite the contents of the remote branch.
git push -f origin master

Guess you like

Origin blog.csdn.net/qq_45257495/article/details/133532597