利用git push here 把项目导入到github仓库中

基本思想的理解

.git 文件,是对项目中的所有的文件的同一管理,会对所有的文件建立索引;当你下次操作git add .的时候,文件发生改变的会进行记录,

操作步骤

1,在github上创建仓库

 

关于github的使用

2.在自己的项目文件中右键   git bash here

3.克隆自己的仓库中信息    git clone https://github.com/shop.git        会有和远程仓库相同的文件夹,文件夹里有.git文件

4.把自己的项目复制到新增的文件夹下     在进行语句:git add . (最后的点必须加上) 把自己的项目文件的索引添加到.git里面

5.git commit -m "添加的信息"

6 git push -u origin master ( -u 只是第一次推送的时候加上,本地仓库会和远程的仓库做一个关联,在以后的操作中就不用添加 -u命令了,直接用 git push origin master)

 

————————————————————————————————————————————————————

进行第二次的提交

git add .

git push origin master

 

________________________________________________________________________________________________

创建分支

git branch dev

git  branch(查看分支)

git  checkout dev(进入分支)

git branch  -r(查看远程分支)

git add .

git commit -m ""

git push origin dev:dev (创建远程分支并提交);

 

更多了解​​​​​​​

 

 

相关文章:

  • 2018-07-25
  • 2021-04-18
  • 2021-09-09
  • 2021-09-18
  • 2021-08-09
  • 2020-01-06
  • 2021-09-23
  • 2021-10-26
猜你喜欢
  • 2021-08-08
  • 2021-11-23
  • 2021-11-12
  • 2021-11-27
  • 2021-10-01
  • 2021-12-04
  • 2021-11-02
  • 2021-10-19
相关资源
相似解决方案