@tomduncalf’s answer
|
|
When run pod install
Get error message
|
|
Fix this
|
|
remove it
|
|
To hide username@computername both in local and ssh login mode
Add following lines in .zshrc
Auto switch theme when ssh login
Change theme line in .zshrc
to following lines
Using agnoster
Install powerline/fonts
Change iterm2 font to Ubuntu Mono Derivative Powerline
reference
Add DEFAULT_USER=zx
in ~/.zshrc
to hide username@localhost
Make theme like screenshot
|
|
iTerm
-> Profiles
-> Colors
->Load Presets...
-> Import...
-> Solarized Dark.itermcolors
Install oh-my-zsh by running follow command
|
|
Instead I went to iTerm2
-> Preferences
-> Profiles
-> Default
and in the General
Tab set the Command
to /bin/zsh
instead of Login shell
显示中文
|
|
install autojump
|
|
Adding a certificate authority to the Java runtime
/Users/[ME]/git-tf/
on mac./Users/[ME]/git-tf/
) to your PATH environment variable.open ~/.profile
|
|
|
|
required java version “1.6.0_65” (must)
download Java for OS X 2014-001
|
|
|
|
|
|
git tf configure http://myserver:8080/tfs/mycollection $/TeamProjectA/Main
git tf pull
git commit -a -m “merge commit”
git tf checkin
git push
|
|
git config [–global] core.autocrlf false
git config [–global] core.ignorecase true
```
Run pod install
Get message like below
|
|
Build project get error below
|
|
#Solution :
Add $(inherited)
to Ohter Linker Flags
Error message
|
|
UI.storyboard
Interface Builder Document
section Opens in
change to Xcode 5.1
Constrain to margins
Can Xcode 6 and Xcode 5 coexist on the same computer?
Xcode
to Xcode6
.Xcode
into Desktop
folder.sudo xcode-select -s /Applications/Xcode.app
to switch between them.How to download Xcode 4 / 5 / 6 and get the DMG file?
https://developer.apple.com/downloads/
Xcode 6
Xcode 5
Xcode 4
How To Set Up Automatic Deployment with Git with a VPS
|
|
Add the following lines into post-receive
|
|
Then make post-receive
executable
|
|
Create a Zip archive that contains the contents of the latest commit on the current branch.
|
|
How many lines of code differs between two commits?
|
|
git merge tool
|
|
resolve merge conflicts
|
|
fetch from origin with deleted remote branches
|
|
revert git commit on server
Undoing a git push
git reset --hard <commit>
git push -f origin <commit>:<branch>
#reset local and origin <branch> to <commit>
reduce git repository size
git reflog expire --all --expire=now
git gc --prune=now --aggressive
git total count
git rev-list HEAD --count
git rebase
git rebase --onto <newbase> <since> <till>
git rebase -i <newbase>
git help config
git help config
git checkout
git checkout
git reset
git reset --soft <commit> # 不修改工作区和暂存区,只重置master
git reset --hard <commit> # 替换工作区,暂存区,master <commit>
git reset --mixed
git reset
git add .
git reset HEAD . # 撤销 git add .
git reset <commit> <paths> # 重置暂存区为<commit>
git reflog
git reflog #查看之前几次修改 SHA1值
git reset --hard HEAD@{num}
commit count
git rev-list HEAD --count
git clean
git clean -f -d
git stash
# 保存当前工作状态
git add . # 加入index
git stash # 保存 ,当前工作区所有
git stash list # 查看 stash list
git checkout -b new_branch
# do some thing ...
git checkout master
git stash pop # 多个stash 使用git stash pop stash@{num}
后悔药
git checkout HEAD^ -- <file path>
HEAD^ 后悔一步
HEAD^^ 后悔两步
HEAD^^^ ...
HEAD^4 ...
HEAD^5 以此类推
角色: 最近六次提交分别是ABCDEF
$git log --online -6
XXXXXXX modify hello.h # F XXXXXXX add hello.h # E
XXXXXXX ignore object files # D
XXXXXXX move .file outside also works. # C
XXXXXXX Hello world initialized # B
XXXXXXX README is frome welcome.txt # A
坏蛋: 提交 D。
目的就是:干掉提交D
需要拣选指令–git cherry-pick
含义是从众多的提交中挑选出一个提交应用在当前的工作分支中。该命令需要提供一个提交ID作为参数,操作过程相当于讲该提交到出为补丁文件,然后在当前HEAD上重放,形成无论内容还是提交说明都一致的提提交
首先对版本库要‘参演’的角色进行标记,使用git tag
命令
git tag F
git tag E HEAD^
git tag D HEAD^^
git tag C HEAD^^^
git tag B HEAD^4
git tag A HEAD^5
1.第一幕干掉坏蛋 D
(1) 执行 git checkout ,暂时将 HEAD 头指针切换到 C。
切换过程显示非跟踪状态的警告,没有关系,因为剧情需要。
$git checkout C
$git checkout -b new_branch_name
(2) 执行拣选操作将 E 提交在
change some history comment
git rebase -i <commit number>
change last comment
git commit --amend
安装自动补全命令
brew install bash-completion
.gitignore
# 这是注释行 -- 被忽略
*.a # 忽略所有以 .a 为扩展名的文件。
!lib.a # 但是 lib.a 文件或者目录不要忽略,即使前面设置了对 *.a 的忽略。
/TODO # 只忽略此目录下的 TODO 文件,子目录的 TODO 文件不忽略。
build/ # 忽略所有 build/ 目录下的文件
doc/*.txt # 忽略文件如 doc/notes.txt,但是文件如 doc/server/arch.txt 不被忽略。
“# a comment - this is ignored
# no .a files
*.a
# but do track lib.a, even though you're ignoring .a files above
!lib.a
# only ignore the root TODO file, not subdir/TODO
/TODO
# ignore all files in the build/ directory
build/
# ignore doc/notes.txt, but not doc/server/arch.txt
doc/*.txt
# ignore all .txt files in the doc/ directory
doc/**/*.txt”
remove ignored files
|
|
git rev-list HEAD | wc -l
git rev-list HEAD | wc -l # 查看历史提交次数
git diff
git diff B A # 比较里程碑 B 和里程碑 A
git diff A # 比较工作区和里程碑 A
git diff --cached A # 比较暂存区和里程碑 A
git diff --cached # 比较工作区和暂存区
git diff HEAD # 比较工作区和HEAD
若只有一个参数就是比较工作区和 这个参数
两个参数就是比较两个参数
参数可以是 里程碑 commitId 工作区 等等
git diff <commit1> <commit2> -- <paths>
git blame
git blame <file path> # 文件追溯