git remote show origin 其中的origin表示自己的项目根目录了。
$ git remote show origin * remote origin Fetch URL: git@gitlab.alibaba-inc.com:middleware/jingwei.git Push URL: git@gitlab.alibaba-inc.com:middleware/jingwei.git HEAD branch: master Remote branches: br-2.1.2.1 tracked br-2.1.2.2 tracked br-2.1.3 tracked master tracked Local branches configured for 'git pull': br-2.1.2.2 merges with remote br-2.1.2.2 master merges with remote master Local refs configured for 'git push': br-2.1.2.2 pushes to br-2.1.2.2 (local out of date) master pushes to master (up to date) shuohailhl@SHUOHAILHL-PC /f/ggg/jingwei/jingwei-webconsole (master) $ git remote show origin2 把远程分支 br-2.1.2.1 pull下来,发现把当前分支给覆盖了,想回滚到之前的修改
shuohailhl@SHUOHAILHL-PC /f/ggg/jingwei (master);当前分支是master,其实想把br-2.1.2.1的代码抓到本地,执行 git pull 相当于 git fetch 和 git merge两个操作的效果,把远程的br-2.1.2.1抓达到本地,并和当前版本合并。(这样做有没有把br-2.1.2.1抓下来呢?)
$ git pull origin br-2.1.2.1 From gitlab.alibaba-inc.com:middleware/jingwei * branch br-2.1.2.1 -> FETCH_HEAD Auto-merging pom.xml CONFLICT (content): Merge conflict in pom.xml Auto-merging jingwei-webconsole/pom.xml CONFLICT (content): Merge conflict in jingwei-webconsole/pom.xml Auto-merging jingwei-monitor/pom.xml CONFLICT (content): Merge conflict in jingwei-monitor/pom.xml Auto-merging jingwei-core/src/main/java/com/taobao/jingwei/core/kernel/AbstractJingWeiCore.java CONFLICT (content): Merge conflict in jingwei-core/src/main/java/com/taobao/jingwei/core/kernel/AbstractJingWe iCore.java Auto-merging jingwei-core/pom.xml Automatic merge failed; fix conflicts and then commit the result.
执行完pull origin后,发现想要抓的版本并没有抓下来
shuohailhl@SHUOHAILHL-PC /f/ggg/jingwei (master) $ git pull origin br-2.1.2.1 From gitlab.alibaba-inc.com:middleware/jingwei * branch br-2.1.2.1 -> FETCH_HEAD Auto-merging pom.xml CONFLICT (content): Merge conflict in pom.xml Auto-merging jingwei-webconsole/pom.xml CONFLICT (content): Merge conflict in jingwei-webconsole/pom.xml Auto-merging jingwei-monitor/pom.xml CONFLICT (content): Merge conflict in jingwei-monitor/pom.xml Auto-merging jingwei-core/src/main/java/com/taobao/jingwei/core/kernel/AbstractJingWeiCore.java CONFLICT (content): Merge conflict in jingwei-core/src/main/java/com/taobao/jingwei/core/kernel/AbstractJingWe iCore.java Auto-merging jingwei-core/pom.xml Automatic merge failed; fix conflicts and then commit the result. shuohailhl@SHUOHAILHL-PC /f/ggg/jingwei (master|MERGING) $ git br br-2.1.2.2 * master
(1)使用 git reset --hard HEAD 命令撤销这次 pull origin 操作 ,还原到最近一次修改
shuohailhl@SHUOHAILHL-PC /f/ggg/jingwei (master|MERGING) $ git reset --hard HEAD HEAD is now at 89700a3 optimize upload file shuohailhl@SHUOHAILHL-PC /f/ggg/jingwei (master) $ git status # On branch master nothing to commit, working directory clean(2)使用 git reset --hard HEAD^
shuohailhl@SHUOHAILHL-PC /f/ggg/jingwei (master|MERGING) $ git reset --hard HEAD^ HEAD is now at f6423ad modify group shuohailhl@SHUOHAILHL-PC /f/ggg/jingwei (master) $ git status # On branch master # Your branch is behind 'origin/master' by 1 commit, and can be fast-forwarded. # nothing to commit, working directory clean再pull一下
$ git pull Updating f6423ad..89700a3 Fast-forward .../webconsole/biz/exception/TimeoutException.java | 29 +++++++++ .../webconsole/util/upload/UploadFileImpl.java | 46 ++++++++++++++ .../webconsole/util/upload/UploadFileService.java | 19 ++++-- .../web/filter/JingweiSecurityFilter.java | 74 +++++++++++++++------- .../webconsole/web/filter/UploadFileFilter.java | 29 +++++++++ .../web/module/screen/api/JingweiGateWay.java | 8 ++- .../screen/api/cmd/GetConsoleTarTimeCommand.java | 61 ++++++++++++++++++ 7 files changed, 238 insertions(+), 28 deletions(-) create mode 100644 jingwei-webconsole/src/main/java/com/taobao/jingwei/webconsole/biz/exception/TimeoutExcept ion.java create mode 100644 jingwei-webconsole/src/main/java/com/taobao/jingwei/webconsole/web/module/screen/api/cmd/G etConsoleTarTimeCommand.java shuohailhl@SHUOHAILHL-PC /f/ggg/jingwei (master) $ git status # On branch master nothing to commit, working directory clean看下git log,发现 “modify group“这次修改早于 ”optimize upload file“这次修改。说明HEAD表示最近一次提交的修改,HEAD^表是最近second新的提交的修改。
前面的7为数字正好一大串数字的前7位。
commit 89700a31c005001d34256761dd4c945c6c70a06
commit f6423ad5ca231e00e44626a2dcb8ba300c7a5fe
Updating f6423ad..89700a3Updating表示本地工作目录从 一个版本(f6423ad)变更到另一个版本(89700a3)。
$ git log commit 89700a31c005001d34256761dd4c945c6c70a06 Author: shuohai.lhl <shuohai.lhl@taobao.com> Date: Sat Aug 3 19:54:46 2013 +0800 optimize upload file commit f6423ad5ca231e00e44626a2dcb8ba300c7a5fe Author: shuohai.lhl <shuohai.lhl@taobao.com> Date: Mon Jul 29 10:42:37 2013 +0800 modify group commit aa4ae6f4f447471d15038b73cb4d5c52b2eb623 Author: shuohai.lhl <shuohai.lhl@taobao.com> Date: Fri Jul 26 10:25:06 2013 +0800 revert commit ba1b6e5e997e866f013cda0feaa043115623d7f Author: shuohai.lhl <shuohai.lhl@taobao.com> Date: Fri Jul 26 09:05:37 2013 +0800 right commit ceec1780e44570e6c311ec7d1db86a0f17e268c Author: shuohai.lhl <shuohai.lhl@taobao.com> Date: Fri Jul 26 09:00:29 2013 +0800 right commit 2f4ce1c1d31be5ffa1d2e79baa98979c36ae99c Author: shuohai.lhl <shuohai.lhl@taobao.com> Date: Sun Jul 21 18:26:12 2013 +0800 fix zk config must match stat config.
一:拖拽
现在在任意的文档库中,你可以拖拽文档到文档库区域,它会以进度条显示上传到文档库中。第一步鼠标点击文档拖动到文档库区域时,它会变成“拖到此处”,第二步放开鼠标,上传。
二:调出菜单
调出菜单取代了原来的ECB。调出菜单显示列表项目的预览,显示之前ECB的操作菜单。更多信息
三:下载
通过“下载副本”,终端用户可以下载文档到本地。点击预览面板的下载图标进行下载。
四:嵌入代码
用户可以获取文档嵌入的代码,粘贴进SharePoint页面的脚本编辑器或内容编辑器Web部件中。点击预览面板的“嵌入代码”图标获取嵌入的代码。更多信息
五:打印PDF
“打印PDF”用来将Word文档转换为PDF并可以就在文档库中打印PDF。点击预览面板的“打印PDF”图标进行打印。更多信息
六:分享&关注
这是SharePoint社会化集成的新方面,你可以和其他用户、组或者是公司的每个人分享文档。你也可以通过点击预览面板的关注按钮来自己关注文档。当你关注一个文档后,你可以在你的新闻订阅中的文档里看到。
以上文档库新功能的更多信息
译者注:工作中还没有用到2013,网上看到一个新功能描述的电子书,翻译一下,权当了解,并与大家分享。By Justin Liu
有时会遇到内存不够用的情况,可以使用本文提供的方法进行增加交换分区。
#制作交换分区——得到文件 [root@serv01 linux-2.6.38]# dd if=/dev/zero of=/swap.img bs=1M count=1024 1024+0 records in 1024+0 records out 1073741824 bytes (1.1 GB) copied, 2.68989 s, 399 MB/s [root@serv01 linux-2.6.38]# ls swap.img #制作交换分区 [root@serv01 linux-2.6.38]# mkswap /swap.img mkswap: swap.img: warning: don't erase bootbits sectors on whole disk. Use -f to force. Setting up swapspace version 1, size = 1048572 KiB no label, UUID=70945855-7bab-4c08-a880-77d089dd06cc #使交换分区生效 [root@serv01 linux-2.6.38]# swapon /swap.img #可以使用free命令查看是否增加成功 [root@serv01 linux-2.6.38]# free total used free shared buffers cached Mem: 384996 378700 6296 0 33232 249252 -/+ buffers/cache: 96216 288780 Swap: 2097136 0 2097136 #关闭,然后删除 [root@serv01 linux-2.6.38]# swapoff /swap.img [root@serv01 linux-2.6.38]# rm -rf /swap.img
我的邮箱:wgbno27@163.com 新浪微博:@Wentasy27 微信公众平台:JustOracle(微信号:justoracle) 数据库技术交流群:336882565(加群时验证 From CSDN XXX) Oracle交流讨论组:https://groups.google.com/d/forum/justoracle By Larry Wen
@Wentasy 博文仅供参考,欢迎大家来访。如有错误之处,希望批评指正。原创博文如需转载请注明出处,谢谢 :) [CSDN博客]