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