git fetch upstream
git checkout upstream/big/develop
git checkout -b big/develop
git remote update upstream
git rebase upstream/{branch name}
一定要切换到到{branch name}
所指定的branchmaster/develop
首先维护的 NGINX 分支是 OpenResty 支持的最新的 NGINX 分支,目前是 release-1.9.15,从此分支 checkout 出来作为咱们要进行二次开发的主分支
目前修改的代码按特性在不同的分支上进行开发,保持特性的独立性
各项目下载主分支的代码进行编译
git reset --hard HEAD~3
GIT_COMMITTER_DATE="
date" git commit --amend --date "
date"
develop
分支git stash
.git br aa
git flow init
-> branch name for production releases: aa
, 后面全回车, 使用默认值.git flow feature start srs_meta
git stash pop
git push
tig
查看我的分支有哪些我的修改. 查看有多少commitgit rebase -i HEAD~12
git fetch origin -p
git rebase origin/develop
tig
我的在 develop
最前git push -f
git fetch origin -p
git log
git rebase origin/develop
git rebase -i HEAD~19
git reflog
tig
git diff origin/feature/srs_meta
git diff origin/feature/srs_meta nginx/app
git push origin feature/srs_meta:feature/srs
vim ~/.gitignore_global
git config --global core.excludesfile ~/.gitignore_global
git remote set-url origin xxx
git tag -l
显示所有tag名称git checkout tags/<tag_name>
切换到<tag_name>git checkout -- hello.rb
sha1 filename
shasum filename
1. 创建~/.gitignore
2. git config --global core.excludesfile ~/.gitignore
20:12 Seveas: Akagi201: likely !newline crap
20:12 Seveas: hmm !crlf
20:12 gitinfo: to fix problems with line endings on different platforms, check out http://line-endings.gitrecipes.de/
20:12 Akagi201: thans both!
20:13 jast: unfortunately the solution outlined there really only works if you've got push access (and can make decisions about stuff like this)
20:13 Seveas: isn't there some global config you can use?
20:14 Seveas: (not on windows, so I've never had problems with this myself)
20:14 jast: another option is to stick your fingers in your ears and go "LALALALA" by doing something like 'git config core.autocrlf false'
20:14 jast: (which is the right setting anyway, IMO)
20:14 Virox: Jusat tried a merge and I got a few conflicts. One of them is "both modified: someFile.txt" I've tried git checkout --ours someFile.txt with but it's still listed there. What should I do to basically use my version?
20:15 jast: Virox: just do a 'git add' on the file to confirm you consider it resolved
20:15 Virox: I was just a bit worried about that. I'll give it a shot though
20:15 jast: if you're satisfied with what's in the file now, that is absolutely the right thing to do
20:15 jast: it's just bad if the file(s) you're adding contain garbage :)