简单处理 git 代码同步 github为例

来源:互联网 发布:搜狐网络大厦招聘 编辑:程序博客网 时间:2024/04/29 04:25


1. 下载代码:  $ git clone url

a. 建立本地库与远程库的引用(远端库名:githelp)

git remote add githelp https://github.com/geoningly/githelp.git

b. 查看本地库有哪些远程库的引用

git remote show githelp

c. 根据分支,checkout

$ git checkout master


2. 上传代码:

a. 将代码同步到本地代码库

$ git add *

$ git commit -m "commit content" //提交内容注释

b. 将代码同步到远程端

$ git push githelp

0 0
原创粉丝点击