1:mkdir a new folder /git
2:make a new file git/readme.txt
3:cd /zhangdi/git then git init,there will be a .git file
4:git add readme.txt
5:git commit -m “a state word”
6:ssh-keygen -t rsa -C “github emal ”
7:copy the .ssh/id_rsa.pub to the github
8:at github,creat a repository tensorflow
9:git remote add origin git@github.com:account/tensorflow
10:git push -u origin master
11:git clone git@github.com:zhang-di/gitskills
error:
failed to push some refs to git
出现错误的主要原因是github中的README.md文件不在本地代码目录中
可以通过如下命令进行代码合并【注:pull=fetch+merge]
git pull –rebase origin master