Git 用法總結,持續更新

2021-09-28 18:30:02 字數 1075 閱讀 8009

從當前分支切換到本地已有目標分支

git chekcout local_branch
從當前分支建立新本地分支並切換到此分支
git checkout -b new_branch
從branch_name中檢出file_name到當前分支
git checkout branch_name file_name
從commit_id的提交記錄中檢出file_name到當前
git checkout commit_id file_name
詳情用法請見: git stash 詳細用法

顯示所有機率,包含以下資訊:

commit_id

author

date

commit msg

git log
git log -p
git log -n
git log --stat
使用者名稱用雙引號包起來
git log --author="eamonnli"
git show commit_id
git show commit_id file_path
支援多個檔案,空格分割

git add file1 file2
三種方式任意,不建議使用

git add .

git add --all

git add -a

git commit -m "***"
兩種方式任意

git commit -am "***"

git commit -a -m "***"

git status
git status -s

Git使用總結(持續更新)

git是分布式版本控制工具,在雲端有乙個遠端庫,用於 共享,方便團隊合作開發。每個人都可以 從遠端 庫拉取 到本地倉庫,然後在本地拉取分支或者進行各種功能開發 bug修復等工作。常用git命令 參考 廖雪峰的git教程 配了個新筆記本,要重新配置git,記錄一下遇到的坑 1.首先要在新筆記本上安裝g...

sass用法總結(持續更新中)

官網 1,巢狀規則 1.1普通巢狀 sass 允許將一套 css 樣式巢狀進另一套樣式中,內層的樣式將它外層的選擇器作為父選擇器 1.2父選擇器 hover 在巢狀 css 規則時,有時也需要直接使用巢狀外層的父選擇器,例如,當給某個元素設定hover樣式時,或者當body元素有某個 classna...

Qt QDialog用法總結 筆記 持續更新中

include mainwindow.h include include include include include include includemainwindow mainwindow qwidget parent qmainwindow parent connect modelessdi...