git常用命令--自用--不断更新
来源:互联网 发布:python api 中文 编辑:程序博客网 时间:2024/06/01 08:47
2014-09-28 更新
SOME COMMOND
git diff 40ef25ddfcee..HEAD >~/m.diff ./test/test.m
git diff HEAD^..HEAD
git diff ..v3.4.0 hw8264/xx.m
//edit the last commit
git commit --amend -m "New commit message"
git reset --soft HEAD^
//name a anonymous state
git checkout -b dynamicimage
//
# to create a new branch and switch to it in one step
$ git checkout -b <branch-name>
Ricard123
//checkout a tag as branch
git checkout -b appstore v3.0.0_1
$ git merge hotfix 合并某个branch
#checkou a commit as branch
git checkout -b newbranchname 0d1d7fc32
//push a branch
git push -u origin mybranch
#diff file has added
$ git diff --cached
git push origin <local-branch-name>:<remote-branch-name>
Substitute for <local-branch-name> and <remote-branch-name>. They may be same or different, as you wish.
//revert an published commit
git revert dd61ab32
http://stackoverflow.com/questions/4114095/revert-to-a-previous-git-commit
//check an old commit as a commit
git co -b nt2 128a1a108e7affcc00bc85b5a333a1f35aa46f7f
//remove local branch
git branch -D the_local_branch
//To delte a remote branch (if you know what you are doing!)
git push origin :the_remote_branch
//push a branch
git push origin newbranch
//rename a local Git branch?
git branch -m <oldname> <newname>
//If you want to rename the current branch, you can simply do:
git branch -m <newname>
//add tag
git tag -a v3.4.0 -m "app store 3.4.0."
#rename a tag
git tag new old
//show all tags
git tag
//git delete a tag
git tag -d tag1
//show tag info
git show v1.0.0
git push origin :the_remote_branch
//update local project
git pull
//mac show hidden files
defaults write com.apple.Finder AppleShowAllFiles YES
defaults write com.apple.finder AppleShowAllFiles -bool NO
//start playing automatically when open
defaults write com.apple.QuickTimePlayerX MGPlayMovieOnOpen 1
//save stash with name
$ git stash save "show reply text on my reply view"
Saved working directory and index state On master: show reply text on my reply view
HEAD is now at ef612d6 fix bug: notify center will blank line when there is no reply txt
YangtekiMacBook-Pro:huwai_ios_v3 yangeric$ git stash list
stash@{0}: On master: show reply text on my reply view
stash@{1}: WIP on (no branch): e6385d7 change notifycenter ui
git stash drop stash@{0}
//show the a list of special commit
git diff-tree --no-commit-id --name-only -r 73f6f7cd898241c2d661c76b253c32d11be3b8a5
#rename a remote
git remote rename origin destination
# Change remote name from 'origin' to 'destination'
https://help.github.com/articles/syncing-a-fork
//undo merge
git reset --hard HEAD^
git reset --hard HEAD~5
# get all git command history
git reflog --date=local
//get branch diff
git diff master..branch
git diff --name-status master..branch
//show all conflicted file after merge branch
git diff --name-only --diff-filter=U
//show diff which was "git add"
git diff --cached
//rename or transfer a repository
//https://github.com/blog/1508-repository-redirects-are-here
git remote set-url origin new_url
//Fetching a remote
https://help.github.com/articles/fetching-a-remote
git pull -u originmaster master
#chmod recursive
chmod -R 777 blog
//down submodule recursive
git submodule update --init --recursive
//list special tag list
$ git tag -l v1.4.2.*
//show tag info
$ git show v4.0.0
//show commit info
$ git show 1894ce8b333e9ed8da42900a253e42d6e59edabb
整页翻页 ctrl-f ctrl-b
f就是forword b就是backward
翻半页
ctrl-d ctlr-u
d=down u=up
滚一行
ctrl-e ctrl-y
gong
cd ~/Library/Developer/Xcode/DerivedData
//copy directory
cp -vr .git/ ../MultiTablesView-master/.git
1、前景色填充ALT+DEL或ALT+BackSpace。
2、背景色填充CTRL+DEL或CTRL+BackSpace。
3、按D键可以以恢复默认的前景色(黑)、背景色(白)。
4、按X键可以切换前景色、背景色。
- git常用命令--自用--不断更新
- git 常用命令----不断更新中
- git常用命令-------自用-------持续更新中
- git常用命令(小白收藏自用)
- Git 常用命令及讲解(不断更新)
- git 自用
- 版本管理器git常用命令集——不断更新
- git常用命令(对付差记性,不断更新的笔记)
- 【Git之窗】(十一)常用命令汇总(不断更新)
- Linux常用命令(自用)
- git clone 自用记录
- git+gerrit 自用记录
- git 自用命令收集
- git自用笔记
- 自用git指令笔记
- mysql常用命令(不断更新)
- linux常用命令(不断更新)
- 【不断更新中】MySql常用命令
- HM中参考图像列表的设置
- Fastjson快速入门
- 前端开发面试题集锦(二)
- 秦绪文:月赚四万水果店微信倾情打造
- HEVC参考图像列表(二)之广义B帧技术GPB
- git常用命令--自用--不断更新
- HDOJ1012 u Calculate e
- http和socket之长连接和短连接区别
- c++ print stacktrace
- 组合索引应该怎么选取引导列?
- Bash脚本15分钟进阶教程
- 【Android学习笔记】progressbar颜色样式更换
- 数字电路设计之低功耗设计方法三:操作数隔离
- HDU 1712 ACboy needs your help(背包)