git config --global user.name "YuboFeng" git config --global user.email "networkprogramming@yeah.net"
git config --global color.ui auto
ssh-keygen -t rsa -C "networkprogramming@yeah.net"
有三处须要用户输入的地方,都按回车便可。git
而后,把 .ssh/id_rsa.pub 文件中的内容所有粘贴到 GitHub 上的 Add SSH Key 便可。github
cat .ssh/id_rsa.pub
git status
git add new_file
git log
-p 选项显示文件修改先后的差异bash
from 暂存区 to 本地仓库ssh
git commit -m "comments"
from 本地仓库 to 远程仓库ui
git push
git pull origin [brunch-name]
提交(commit)以前必须作url
git diff HEAD
git remote add [name] [url]
Explaning the processing of Pull Request with RaRe-Technologies/gensim..net
Frok from the origin日志
Clone from your Forkcode
首先,咱们须要确认分支rem
$ git branch -a * develop # develop 为当前分支 remotes/origin/HEAD -> origin/develop
而后,建立特性分支。咱们建立一个名为 wordsim240-296-297 的分支。
$ git checkout -b wordsim240-296-297 develop Switched to a new branch 'wordsim240-296-297' # 当前分支自动被切换 $git branch -a # 再次确认当前分支 develop * wordsim240-296-297 remotes/origin/HEAD -> origin/develop
对代码仓库进行修改,将修改添加至本地仓库,提交修改:
$ git add ..... $ git commit -m "some editing"
而后,建立远程分支:
$ git push origin wordsim240-296-297 remotes/origin/HEAD -> origin/develop
再次确认分支
$ git branch -a develop * wordsim240-296-297 # 分支已被建立 remotes/origin/HEAD -> origin/develop