File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -441,6 +441,14 @@ git branch -D dev
441441git push --set-upstream origin v1
442442```
443443
444+ 也可以使用
445+
446+ ``` cmd
447+ git push -u origin v1
448+ ```
449+
450+ 更多詳細說明可參考 [ https://git-scm.com/docs/git-push#git-push--u ] ( https://git-scm.com/docs/git-push#git-push--u )
451+
444452![ alt tag] ( https://i.imgur.com/1fuS2VY.jpg )
445453
446454接下來你可以到網頁上看 ( 這裡用 bitbucket 當作範例 ) ,你會發現有分支 v1 了
@@ -1193,6 +1201,28 @@ git show [<options>] [<object>…]
11931201
11941202其他更詳細的介紹,請參考 [ https://git-scm.com/docs/git-diff ] ( https://git-scm.com/docs/git-diff )
11951203
1204+ ## git grep
1205+
1206+ 以下為官方說明
1207+
1208+ ``` text
1209+ git-grep - Print lines matching a pattern
1210+ ```
1211+
1212+ 簡單說,就是可以幫你找出符合的 pattern,舉個例子,我希望找出內容
1213+
1214+ 有包含 hello 這個 pattern 的檔案,這時候,就可以執行以下指令
1215+
1216+ ``` cmd
1217+ git grep "hello"
1218+ ```
1219+
1220+ ![ alt tag] ( https://i.imgur.com/t5vxvvp.png )
1221+
1222+ 會顯示出該 pattern 在個檔案以及哪段程式碼有用到。
1223+
1224+ 其他更詳細的介紹,請參考 [ https://git-scm.com/docs/git-grep ] ( https://git-scm.com/docs/git-grep )
1225+
11961226## git 其他設定
11971227
11981228我們已經設定了 user.name 以及 user.email ,但 Git 上其實還有很多可設定的東西
You can’t perform that action at this time.
0 commit comments