git reflog 可以查看所有分支的所有操作記錄
(包括已經(jīng)被刪除的 commit 記錄和 reset 的操作)
git reset --hard HEAD~1,退回到上一個版本
git show 39e85b2 # show details
# Amend Author Of Previous Commit
$ git commit --amend --author "D <d@r.com>"
************************ 分割線 *******************************
1. git checkout -b <new_branch> # -b == branch, 新建一個分支。
#### github workflow
0. Fork. copy a repo under my account.
(need access to the repo)
1. branching,start a new work placef
2. commit, make some changes
3. pull request, compare with others' branch
4. collaborate, 協(xié)作。
5. merge
6. open pull request
**********************************
###git command means:
1. git pull, shows some changes from other people
1. git cofig -l , 列出所有的配置信息
2. git help cmd , 查看某個命令的幫助信息
#### 初次安裝git需要配置的信息
(這里的 --global,意思是整個系統(tǒng)全局的配置。)
$ git config --global user.name "John Doe"
$ git config --global user.email johndoe@example.com
$ git config --global core.editor subl
Git fork(修改別人的內(nèi)容)筆記:
1. git remote -v
查看本地倉庫所屬的遠(yuǎn)程信息(這個倉庫屬于誰的,從哪來的)
2. git remote add upstream + 原始倉庫地址
這個命令的目的是:添加 本地與遠(yuǎn)程的同步關(guān)系
再次 輸入 git remote -v 查看顯示結(jié)果
3. 然后是 寫上自己需要修改的內(nèi)容。 git push就行了????? 需要再測試一下。