git

一、本地项目在github新建仓库
-------
1.在github创建一个仓库。
2.在项目文件夹的Terminal窗口以此输入:
1.git init
2.git commit -m 'first'
3.git add remote orgin 项目的git地址
4.git pull
5.git pull orgin master
6.git pull orgin master --allow-unrelated-histories
6.git push
3.大功告成
----------
二、日常pull和push命令
1.第一步看分支是否是想要推送的分支
2.git status
3.git add .
4.git commit -m 'commit'
5.git push
提醒:保持最新版本.不是最新版本不能push.需要先pull然后merge。

posted @ 2018-05-11 09:21  少年郎dj  阅读(104)  评论(0编辑  收藏  举报