我是 git 存储库的新手。我尽力去了解它。我需要将一个自动化项目推送到谷歌存储库。我执行了以下评论来执行此操作。
$ git init
$ git add .
$ git commit -m "initial commit"
$ gcloud init && git config credential.helper gcloud.cmd
$ git remote add google https://source.developers.google.com/p/[PROJECT_NAME]/r/[REPO_NAME]
$ git push --all google
我设法成功推送了该项目,但它没有反映在存储库的默认分支上。当我导航到存储库时,它显示
默认分支上没有提交。将代码推送到默认分支或切换分支。
看起来main不是默认分支,云中有多个分支
我试图合并但仍然没有改善
$ git remote
google
$ git fetch
$ git checkout HEAD
Your branch is up to date with 'google/main'.
$ git merge main
Already up to date.
我需要将我的主分支合并到谷歌云存储库上的默认分支。请帮忙