Bambiland
  • Works
  • Blog
  • About
  • Search
  • Line Store
Mobile nav

Git 常用指令(持續更新)

支線(Branch)相關

所有支線列表


    	git branch
    

新增支線


    	git branch 你的新支線名稱
    

切換支線


    	git checkout 想切過去的支線
    

刪除支線


		// 先切換到其他任一條線
    	git branch -d 想刪除的支線
    

合併支線


		git merge
    

合併支線內容成一個 commit


		git merge --squash 被合併的支線
    


提交(commit)相關

commit 後悔了

1. 若還沒 push 到 remote

	git reset HEAD^ --hard
    
2. 已 push 到 remote ( 新增一個 commit 還原之前寫的 code )

	// 取消一個 commit
    git revert HEAD --no-edit
	
    // 取消多個 commit
    git revert HEAD~5 (取消五個)
    


同步相關

下載遠端資料並合併到本機


    	git pull // git pull = git fatch + git merge 
    
Prev
Next

RECOMMEND

line 貼圖分析小幫手超級 Beta 版上線

line 貼圖分析小幫手超級 Beta 版上線

如何在 ckeditor 加上程式碼片段外掛 ( code snippet plugin )

如何在 ckeditor 加上程式碼片段外掛 ( code snippet plugin )

css 筆記 | 用純 css 做逐格動畫

css 筆記 | 用純 css 做逐格動畫

前端超好用外掛推薦 | 常用外掛清單

前端超好用外掛推薦 | 常用外掛清單

Html 常用屬性(持續更新)

Html 常用屬性(持續更新)

  • Blog
  • About
  • Contact
shareTool
Language

Copyright © Bambiland. Made with Webblize.

  • Works
  • Blog
  • About
Language