顯示具有 git 標籤的文章。 顯示所有文章
顯示具有 git 標籤的文章。 顯示所有文章

2020年10月13日 星期二

[git]stash指令

 git stash 暫存指令


git stash list 可以看到目前的暫存清單

git stash drop 刪除最近一筆的暫存

git stash clear 刪除所有的暫存

git stash apply 恢復最近一筆

git stash 暫存目前的修正


使用方式:

git status (發現有修正)

git stash

git pull origin

git checkout develop

git status apply


-------


git操作及fatal: Authentication failed for錯誤解決

1、配置使用者資訊

git config –global user.name [username]

git config –global user.email


2、查詢使用者資訊

git config –list

3、如果push遇到在輸入密碼是熟錯後,就會報這個錯誤fatal: Authentication failed for

解決辦法:

git config –system –unset credential.helper

之後你在push就會提示輸入名稱和密碼

在使用此指令 允許權限使用(否則每次都會提示再輸入密碼)

git config --global credential.helper wincred

[GIT]修改commit 合併

 情境::已經commit & push 要再次修改psh上的某一個commit要如何實現

STEP1: git status (確認目前要修改的內容狀態)

STEP2: git add -u (選擇要修改的全部檔案)

STEP3: git commit (因為會合併回上一個commit,在此命名為commit1,commit2)

STEP4: git rebase -i Head~2 (案I,將commit2開頭的pick刪除,改成s,並按下esc,:wq。按I,刪除commit log,再按esc,:wq。)

STEP5: git push origin Head -f

STEP6: 完成瞜! (commit2會合併回commit1)


2020年4月9日 星期四

git常用指令

git 指令筆記

git clone + clone網址


git fetch
git pull origin


git status

git diff
(關閉案q)


git add --all
git commit
    enter + i
    編輯完畢後 esc + wq


git push origin head

(edit commit)-----

git commit --amend
git push -f


[SQL]顯示千分位與小數顯示

  CONVERT ( data_type [ ( length ) ] , expression [ , style ] ) CONVERT style參數說明 1  (expression為 money 或 smallmoney型別): 0 : 預設,保留小數位後兩位,並四捨...