找到你要回到的 hash
$ git reset --hard hash
$ git push -f origin master
| var fs = require('fs'); | |
| var path = require('path'); | |
| var url = require('url'); | |
| var protocol = { | |
| https: require('https'), | |
| http: require('http') | |
| }; | |
| function download(src, dest, cb) { | |
| var options = url.parse(src); |
| module.exports = function(grunt) { | |
| grunt.initConfig({ | |
| // https://github.com/gruntjs/grunt-contrib-watch | |
| // grunt.loadNpmTasks('grunt-contrib-watch'); | |
| // 页面上插入 <script src="http://localhost:35729/livereload.js"></script> | |
| watch: { | |
| scripts: { | |
| files: ['**/*'], | |
| task: [], |
| function format(fmt, args) { | |
| if (!fmt) return ''; | |
| var toString = Object.prototype.toString; | |
| if (toString.call(args) === '[object Object]') { | |
| return fmt.replace(/%{?([a-z]*)}?/g, function(all, m1){ | |
| return args[m1] ? args[m1] : all; | |
| }); | |
| } else { | |
| if (toString.call(args) !== '[object Array]') { |
| var fs = require('fs'); | |
| var path = require('path'); | |
| var spawn = require('child_process').spawn; | |
| function run(cmd) { | |
| var output, out, index = cmd.indexOf('>'); | |
| if (index > -1) { | |
| output = cmd.substring(index + 1).replace(/(^\s+|\s+$)/g, ''); | |
| cmd = cmd.substring(0, index).split(/\s+/); | |
| } else { |
| var https = require('https'); | |
| var Base64 = require('js-base64').Base64; // can use other base64 implement | |
| var twitterConsumerKey = 'your consumer key'; | |
| var twitterConsumerSecret = 'your consumer secret'; | |
| var encodedBearerToken = Base64.encode(twitterConsumerKey + ':' + twitterConsumerSecret); | |
| var options = { | |
| hostname: 'api.twitter.com', | |
| path: '/oauth2/token', |
| var stat = fs.statSync(dir); | |
| (stat.mode & 07777).toString(8); // => e.g. 755 |
| 1) .gitmodules | |
| 2) .git/config | |
| 3) git rm --cache path/to/module |
找到你要回到的 hash
$ git reset --hard hash
$ git push -f origin master
svn 设置忽略
$ svn propset svn:ignore 'a' .
svn 删除忽略
$ svn propdel svn:ignore 'a' .