1、在github上创建版本库cpptest
2、在ubuntu上代码路径/home/mnt/c/cpptest/目录下执行git init
3、git add *
4、git commit -m “cpp file test”
5、git remote add origin git@github.com:greatitman/cpptest.git
6、git push -u origin master,此步若出现类似“non-fast-forward errors”的错误,则执行7
7、git pull,此步若出现“branch.master.merge”类似错误,则执行8
8、修改配置文件.git/config或执行如下命令
git config branch.master.remote origin
git config branch.master.merge refs/heads/master