$ sw_vers ProductName: Mac OS X ProductVersion: 10.12.3 BuildVersion: 16D30
$ git --version git version 2.18.0
I recently created a outsourcing project that needs to submit the project code to empolyer’s github repository, But i want to save the project in my private repository at the same time, so i thick i can submit it to two repositories at the same time when i push the git. Here is my personal code repository gitee.
The first step, create a new repository
It named https://gitee.com/liyuliang/xxxx Be careful not to check the option Use Readme file to initialize this project (使用Readme文件初始化这个项目) The first time i checked this option, i got an error when git pushing
1 2 3 4 5 6 7 8
To gitee.com:liyuliang/xxxx.git ! [rejected] master -> master (fetch first) error: failed to push some refs to 'firstname.lastname@example.org:liyuliang/xxxx.git' hint: Updates were rejected because the remote contains work that you do hint: not have locally. This is usually caused by another repository pushing hint: to the same ref. You may want to first integrate the remote changes hint: (e.g., 'git pull ...') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details.