Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Laradebut #02 版本控制管理與操作 以 git 為例

Laradebut #02 版本控制管理與操作 以 git 為例

本簡報以 GIT 為例,講述版本管理 ( Version Control ) 的觀念與 GIT 背後的原理。 相關錄影於:https://www.youtube.com/watch?v=cX9IbYgyeqc

mouson(墨嗓)

July 14, 2016
Tweet

More Decks by mouson(墨嗓)

Other Decks in Technology

Transcript

  1. 獤碂ୗ 膏 褸Ӿୗ • 褸Ӿୗ EX: Subversion牏CVS • ಅ磪砺֢᮷ࣁӾ瓷牧䷱磪翕᪠蝫矑㳷 篷ဩਂ玲

    • 獤碂ୗ EX: Mercurial SCM牏GIT • ๜瑿疰磪ਠ碉懿袅牧䷱磪翕᪠犖ݢ犥 砺֢
  2. git commit • git commit --amend • git commit --amend

    --author=“Name <[email protected]>” • git config user.name “Mou Chen” • git config user.email [email protected] • git config --global user.name “Mou Chen”
  3. git config alias 1. git config alias.co checkout • git

    co 缛ෝ git checkout 2. git config alias.ci commit • git ci 缛ෝ git commit 3. …
  4. git ૡٍ • ZSH (http://www.zsh.org/) • oh-my-zsh (http://ohmyz.sh/) • powerline

    (https://github.com/powerline/ powerline) • git autocomplete (https://github.com/ robbyrussell/oh-my-zsh/tree/master/ plugins/git )
  5. git reset […] ᯿ᗝ Local Local Repo/ Master Staging Area

    Workspace —soft HEAD^ —mixed HEAD^ git reset —hard HEAD^
  6. git remote add origin git@git.. Local Remote Remote Repo/ Master

    Remote Repo/ Master Local Repo/ Master Staging Area Workspace
  7. git push -u origin master Local Remote Remote Repo/ Master

    Remote Repo/ Master Local Repo/ Master Staging Area Workspace git push
  8. git fetch Local Remote Remote Repo/ Master Remote Repo/ Master

    Local Repo/ Master Staging Area Workspace git push git fetch
  9. git merge Local Remote Remote Repo/ Master Remote Repo/ Master

    Local Repo/ Master Staging Area Workspace git push git merge git fetch
  10. git pull Local Remote Remote Repo/ Master Remote Repo/ Master

    Local Repo/ Master Staging Area Workspace git push git merge git fetch git pull