我支持从https://git-scm.com/下载的Git,并按照ssh的说明进行操作,以获取指示https://stackoverflow.com/a/26130250/4058484。
在我的Bitbucket帐户中验证了生成的公钥后,并参考http://www.bohyunkim.net/blog/archives/2518上说明的步骤,我发现只是'git push'在起作用:
git clone https://me@bitbucket.org/me/test.git
cd test
cp -R ../dummy/* .
git add .
git pull origin master
git commit . -m "my first git commit"
git config --global push.default simple
git push
Shell的响应如下:
$ git push
Counting objects: 39, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (39/39), done.
Writing objects: 100% (39/39), 2.23 MiB | 5.00 KiB/s, done.
Total 39 (delta 1), reused 0 (delta 0)
To https://me@bitbucket.org/me/test.git 992b294..93835ca master -> master
它甚至适用于将master合并到GitHub中的gh-pages
git checkout gh-pages
git merge master
git push