<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    軟件是對質量的不懈追求

    'git revert' Is Not Equivalent To 'svn revert'

    I just learned that if you have some changes in your working tree that you want to get rid of, you don't type 'git revert' like you might guess. No, that's what cvs, subversion, mercurial, and bazaar (to name a few) use revert to mean, but not git. With git, revert is used to undo actual commits. Thankfully, you can undo your revert with another 'git revert', I just learned. So let me repeat to be clear, if you have changes to your working files that you want to abandon, DO NOT do this:

    git revert HEAD

    That will undo your last commit. Do this instead:

    git reset --hard HEAD

    I'm glad I have that straightened out now. I'm wondering if /etc was really a good place for me to start out playing with git.

    UPDATE: Nearly two years later and I'm still getting comments on this. I'm glad I've been able to help people out this way. The discussion in the comments is good, and one thing I'd like to point out is that I now always use and recommend:

    git checkout filename

    (as recommended by Anonymous and others below) instead of git reset. I think the git stash trick from Nicolas is pretty cool too.

    posted on 2010-01-06 14:48 BlakeSu 閱讀(662) 評論(0)  編輯  收藏


    只有注冊用戶登錄后才能發表評論。


    網站導航:
     
    主站蜘蛛池模板: 久久精品国产亚洲AV网站| 亚洲国产午夜精品理论片| 久久激情亚洲精品无码?V| 麻豆亚洲AV永久无码精品久久| 色综合久久精品亚洲国产| 亚洲国产精品成人久久蜜臀 | 在线观看免费国产视频| 久久99精品免费一区二区| 亚洲色四在线视频观看| 国产啪精品视频网站免费尤物 | 四虎免费在线观看| 成人电影在线免费观看| 亚洲国产成人综合精品| 好吊妞998视频免费观看在线| 国产精品视频全国免费观看| 女人被免费视频网站| 国色精品va在线观看免费视频| 亚洲精品无AMM毛片| 亚洲精品自在线拍| 成人黄色免费网站| 亚洲国产福利精品一区二区| 久久久久亚洲AV无码专区桃色| 我要看WWW免费看插插视频| 久久精品成人免费观看| 久久精品国产亚洲AV无码麻豆| 四虎永久免费地址在线观看| 美女视频黄a视频全免费| 久久综合亚洲色hezyo| 亚洲国产电影在线观看| 亚洲一区二区三区高清| 亚洲精品乱码久久久久久按摩| 国产jizzjizz免费看jizz| 好爽好紧好大的免费视频国产| 亚洲天堂免费在线| 99在线精品视频观看免费| 日韩人妻无码精品久久免费一| 在线观看黄片免费入口不卡| 亚洲免费观看在线视频| 亚洲国产一区在线观看| 亚洲国产日产无码精品| 久久久亚洲裙底偷窥综合|