<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 閱讀(659) 評論(0)  編輯  收藏


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


    網站導航:
     
    主站蜘蛛池模板: 九九精品免费视频| 污污网站18禁在线永久免费观看| 日本片免费观看一区二区| 国产av天堂亚洲国产av天堂| 久久久久国色AV免费观看| 亚洲国产综合人成综合网站| 国产精品亚洲一区二区三区| 成人午夜18免费看| 亚洲国产午夜精品理论片在线播放| 毛片免费在线视频| 国产精品亚洲lv粉色| 国产成人精品免费直播| 免费看一级一级人妻片 | 亚洲国产成人精品无码区二本| 99久久免费国产香蕉麻豆| 亚洲综合综合在线| 成熟女人特级毛片www免费| 亚洲AV无码一区二区三区性色| 免费乱码中文字幕网站| 成人免费观看男女羞羞视频| 国产中文在线亚洲精品官网| 久久99精品免费视频| 亚洲依依成人精品| 国产精品免费_区二区三区观看| 农村寡妇一级毛片免费看视频| 亚洲精品高清国产一线久久| 蜜桃AV无码免费看永久| 亚洲色大18成人网站WWW在线播放 亚洲色大成WWW亚洲女子 | 亚洲人成电影网站| 韩国18福利视频免费观看| 美女黄色毛片免费看| 亚洲乱码中文字幕综合| 亚洲一区二区三区免费在线观看| 亚洲熟伦熟女专区hd高清| 国产精品亚洲高清一区二区| 毛片免费全部播放无码| 久久亚洲精品成人无码| 亚洲国产精品成人久久| 两个人的视频高清在线观看免费| h视频在线观看免费| 亚洲午夜在线一区|