If you want to deploy code from local Git, please make sure you have installed the Git, then follow the steps below.
1.Login and configure a deployment user
az login
az webapp deployment user set --user-name 'joyw1' --password 'Password01!'

2.Get the deployment URL
az webapp deployment source config-local-git -g <group-name> -n <webapp-name>

3.Open a local terminal window to your local Git repository.

4.Add an Azure remote, replace the with the one in step 2.
git remote add azure <url>
Then run the command to push to Azure, it will let you to input the username and password, just input them that you set in the step 1.
git push azure master

For more details, you could refer to this doc - Local Git deployment to Azure App Service.