http://blog.sina.com.cn/s/blog_4ce89f2001014qvr.html


1.git clone                                      从远程的Git版本库克隆代码,也可以理解成检出代码,可以在末尾指定新的名字
        eg. git  clone  git://github.com/someone/some_project.git   some_project
2.git remote -v                               查看远程仓库
3.git remote rm [name]                  删除远程仓库
4.git remote set-url --push [name] [newUrl] 修改远程仓库
5.git pull [remoteName] [localBranchName]   拉取远程仓库
        eg. git pull origin master
6.git push [remoteName] [localBranchName]   推送远程仓库
        eg. git push origin master
7.git add
        git add test.txt                #注意,要gitignore一些特殊文件,然后每一>次提交前git status,确认提交的每一个文件
        git add - A
        git add *.c                     #用通配符的方式跟踪文件
8.git commit -m "msg"
9.git config
        git config --global user.name "myname"          #设置用户名
        git config --global user.email "myemail"        #设置邮箱
        git config --global core.editor "myeditor"      #设置编辑器
        git config --list                           

相关文章:

  • 2022-02-08
  • 2021-08-29
  • 2022-01-09
  • 2021-10-19
  • 2022-02-23
  • 2022-02-10
猜你喜欢
  • 2021-10-23
  • 2021-09-18
  • 2021-06-01
  • 2021-09-23
  • 2021-08-21
相关资源
相似解决方案