这些是我创建远程 git 存储库并将本地计算机中的数据推送到它的步骤:
# mkdir -p git/sports.git
# cd git/
# cd sports.git/
# git init --bare
Initialized empty Git repository in /home/tirengarfio/git/sports.git/
# exit
logout
Connection to 173.203.57.258 closed.
(master)]$ git remote add origin ssh://root@173.203.57.258/home/tirengarfio/git/sports.git
(master)]$ git push --all
root@173.203.57.258's password:
Counting objects: 1271, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (1236/1236), done.
Writing objects: 100% (1271/1271), 1.11 MiB, done.
Total 1271 (delta 37), reused 0 (delta 0)
To ssh://root@173.203.57.258/home/tirengarfio/git/sports.git
* [new branch] master -> master
我去的/home/tirengarfio/git/sports.git/branches
时候是空的。。