iT邦幫忙

0

git 在同一個 file 裡面選擇 commit 部分內容

  • 分享至 

  • xImage

想請問一下各位高手,專案在 commit 時,有辦法在選擇同一個 file 裡面只選擇部分內容嗎?

例如 在 a.js 資料夾中,只 commit console.log('1'),然後 console.log('2') 先不 commit

console.log('1')
.
.
.
console.log('2')
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

2 個回答

3
hokou
iT邦好手 1 級 ‧ 2023-08-13 20:17:17
最佳解答
看更多先前的回應...收起先前的回應...
janlin002 iT邦好手 1 級 ‧ 2023-08-13 21:02:40 檢舉

謝謝你的分享~解決了我的問題~~

whitefloor iT邦研究生 2 級 ‧ 2023-08-14 09:32:16 檢舉

我還是第一次知道可以這樣搞==

pickuse iT邦新手 4 級 ‧ 2023-08-14 09:57:05 檢舉

哦,我現在才知道原來 sourcetree 有內建,有遇到再試試看~

janlin002 iT邦好手 1 級 ‧ 2023-08-14 10:16:21 檢舉

基本上應該不太會遇到吧,遇到也是先註解?
/images/emoticon/emoticon10.gif

0
海綿寶寶
iT邦大神 1 級 ‧ 2023-08-13 18:38:59

沒辦法

我要發表回答

立即登入回答