Git reset and Bootstrap
I'm having a problem reseting my app to a previous commit. I'm trying out bootstrap for the first time and when I tried to modify bootstrap_and_overrides.css.less I broke something and the styling was all over the place.
I had no problem completely discarding the changes and had a commit on my local machine that was not pushed and where the code was working perfectly so I used
git reset --hard 0f0503e......
to reset my local repository. I got the message
HEAD is now at 'commit message'
but the styling is still broken. I then tried to go back one further. Again I got the message that the branch has been reset but my styling is all over the place. I'm now at a stage where I've reset to my last published commit and being very new to git/bootstrap and a beginner with ruby on rails - I'm really not sure how to fix this.
Have I broken something by reseting my repository? Or is this a bootstrap problem?
Make sure you don't have private (not versioned) files laying around, which could produce some side-effect explaining the broken CSS.
Check if you have such files:
git clean -d -x -n
(It previews what would be cleaned)
Then remove everything:
git clean -d -x -f
(As mentioned in "How do I clear my local working directory in git?")
The resulting (cleaned) working-tree would then be truly equals to 0f0503e
(the commit you git reset --hard
to).
上一篇: 使用Rails提交并推送Git存储库
下一篇: Git重置和Bootstrap