GitHub

git 常用 config命令

$ git config -global user.name "Your Name Here"
$ git config -global user.email "your_email@example.com"
$ git config -list
$ exit

Adding(workspace to index)

$ git add.  %adds all new files
$ git add -u %update tracking for files that changed names or were deleted
$ git add -A %does both of the previous

commit( index to local repository)

$ git commit -m "message" %where message is a useful description of what you do

push(local repository to remote repository)

$ git push

branches(想在原代码基础上做新代码,但是不愿意改原代码)

$ git checkout -b branchname %create a branch
$ git branch % to see what branch you are on
$ git checkout master %back to the master branch type

pull request 要求将自己的代码加入主程序,有个按钮。

——————————————————————————————-
Initialize a local Git repository in the directory

$ git init

将本地repository和github上的远程 repository相连

$ git remote add origin https://github.com/yourUserNameHere/test-repo.git

——————————————————————————————-
如何在他人的github代码基础上进行开发:
点击”Fork”按钮,会将代码复制到自己的github下。
将该repository复制到本地:

$git clone http://github.com/yourUserNameHere/repoNameHere.git
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值