開發中不想把修改的部份 commit ,怎麼使用 rebase 抓取新的程式碼
- 把修改的檔案加到 stage
git add .
git commit -m 'add to stash'
- 使用 pull --rebase 拉取新的程式碼
git pull --rebase origin master
途中可能要解決一些 conflict 問題
- 最後
git reset HEAD~1
把自己的最後一次 commit reset 掉,並保留更新的內容。
import boto import boto.s3.connection access_key = 'put your access key here!' secret_key = 'put your secret key here!' conn = boto.connect_s3( aws_access_key_id = access_key, aws_secret_access_key = secret_key, host = 'objects.dreamhost.com', #is_secure=False, # uncomment if you are not using ssl calling_format = boto.s3.connection.OrdinaryCallingFormat(), )
conn.create_bucket('my-new-bucket')
for bucket in conn.get_all_buckets(): print bucket
{ "old_index": "logs-0001", "new_index": "logs-0002", "rolled_over": true,"dry_run": false,
"conditions": {
"[max_age: 7d]": false, "[max_docs: 1000]": true } }
2,147,483,519 documents in total across all shards that will be shrunk into a single shard on the target index as this is the maximum number of docs that can fit into a single shard.PUT /my_source_index/_settings { "settings": { "index.routing.allocation.require._name": "shrink_node_name","index.blocks.write": true
} }
POST my_source_index/_shrink/my_target_index
升級完你的 pip 與 setuptools 應該可以解決大部分的問題sudo pip install --upgrade setuptools pip