如何将项目添加到git上

1、cd 到你要添加的项目文件夹中

 

2、使用命令 git init

注:将你的目录管理成git仓库 就是初始化git

 

3、使用命令 git add . (注意一定要加点哦)

注:将你的文件添加到git库中

 

4、使用命令 git commit -m '你的备注文件'

注:将你的文件提交到git仓库中,然后备注你提交的文件是什么内容是什么主题是什么等

 

5、使用命令 git remote add origin 远程地址

注:和git远程地址建立连接

 

6、使用命令 git pull --rebase origin master 

注:获取远程地址的内容与本地合并 如果你的远程库没有东西就不用了   如果有内容就需要 并且要写明分支 master等

 

7、使用命令 git push -u orgin master

注:将本地的代码提交到远程上并push 输入用户名和密码

 

成功~~

 

posted @ 2019-05-31 14:27  king_94boy  阅读(5181)  评论(0编辑  收藏  举报